@@ -17,7 +17,7 @@ func TestComponentSecurityOauthURLUpdated(t *testing.T) {
1717
1818 s2 .Spec .Components .SecuritySchemes ["petstore_auth" ].Value .Flows .Implicit .AuthorizationURL = "http://example.new.org/api/oauth/dialog"
1919
20- d , osm , err := diff .GetWithOperationsSourcesMap (getConfig (), s1 , s2 )
20+ d , osm , err := diff .GetWithOperationsSourcesMap (diff . NewConfig (), s1 , s2 )
2121 require .NoError (t , err )
2222 errs := checker .CheckBackwardCompatibilityUntilLevel (singleCheckConfig (checker .APIComponentsSecurityUpdatedCheck ), d , osm , checker .INFO )
2323 require .Len (t , errs , 1 )
@@ -39,7 +39,7 @@ func TestComponentSecurityOauthTokenUpdated(t *testing.T) {
3939
4040 s2 .Spec .Components .SecuritySchemes ["petstore_auth" ].Value .Flows .Implicit .TokenURL = "http://example.new.org/api/oauth/dialog"
4141
42- d , osm , err := diff .GetWithOperationsSourcesMap (getConfig (), s1 , s2 )
42+ d , osm , err := diff .GetWithOperationsSourcesMap (diff . NewConfig (), s1 , s2 )
4343 require .NoError (t , err )
4444 errs := checker .CheckBackwardCompatibilityUntilLevel (singleCheckConfig (checker .APIComponentsSecurityUpdatedCheck ), d , osm , checker .INFO )
4545 require .Len (t , errs , 1 )
@@ -61,7 +61,7 @@ func TestComponentSecurityTypeUpdated(t *testing.T) {
6161
6262 s2 .Spec .Components .SecuritySchemes ["petstore_auth" ].Value .Type = "http"
6363
64- d , osm , err := diff .GetWithOperationsSourcesMap (getConfig (), s1 , s2 )
64+ d , osm , err := diff .GetWithOperationsSourcesMap (diff . NewConfig (), s1 , s2 )
6565 require .NoError (t , err )
6666 errs := checker .CheckBackwardCompatibilityUntilLevel (singleCheckConfig (checker .APIComponentsSecurityUpdatedCheck ), d , osm , checker .INFO )
6767 require .Len (t , errs , 1 )
@@ -81,7 +81,7 @@ func TestComponentSecurityAdded(t *testing.T) {
8181 s2 , err := open ("../data/checker/component_security_updated_revision.yaml" )
8282 require .NoError (t , err )
8383
84- d , osm , err := diff .GetWithOperationsSourcesMap (getConfig (), s1 , s2 )
84+ d , osm , err := diff .GetWithOperationsSourcesMap (diff . NewConfig (), s1 , s2 )
8585 require .NoError (t , err )
8686 errs := checker .CheckBackwardCompatibilityUntilLevel (singleCheckConfig (checker .APIComponentsSecurityUpdatedCheck ), d , osm , checker .INFO )
8787 require .Len (t , errs , 1 )
@@ -101,7 +101,7 @@ func TestComponentSecurityRemoved(t *testing.T) {
101101 s2 , err := open ("../data/checker/component_security_updated_base.yaml" )
102102 require .NoError (t , err )
103103
104- d , osm , err := diff .GetWithOperationsSourcesMap (getConfig (), s1 , s2 )
104+ d , osm , err := diff .GetWithOperationsSourcesMap (diff . NewConfig (), s1 , s2 )
105105 require .NoError (t , err )
106106 errs := checker .CheckBackwardCompatibilityUntilLevel (singleCheckConfig (checker .APIComponentsSecurityUpdatedCheck ), d , osm , checker .INFO )
107107 require .Len (t , errs , 1 )
@@ -123,7 +123,7 @@ func TestComponentSecurityOauthScopeAdded(t *testing.T) {
123123
124124 s2 .Spec .Components .SecuritySchemes ["petstore_auth" ].Value .Flows .Implicit .Scopes ["admin:pets" ] = "grants access to admin operations"
125125
126- d , osm , err := diff .GetWithOperationsSourcesMap (getConfig (), s1 , s2 )
126+ d , osm , err := diff .GetWithOperationsSourcesMap (diff . NewConfig (), s1 , s2 )
127127 require .NoError (t , err )
128128 errs := checker .CheckBackwardCompatibilityUntilLevel (singleCheckConfig (checker .APIComponentsSecurityUpdatedCheck ), d , osm , checker .INFO )
129129 require .Len (t , errs , 1 )
@@ -146,7 +146,7 @@ func TestComponentSecurityOauthScopeRemoved(t *testing.T) {
146146 // Add to s1 so that it's deletion is identified
147147 s1 .Spec .Components .SecuritySchemes ["petstore_auth" ].Value .Flows .Implicit .Scopes ["admin:pets" ] = "grants access to admin operations"
148148
149- d , osm , err := diff .GetWithOperationsSourcesMap (getConfig (), s1 , s2 )
149+ d , osm , err := diff .GetWithOperationsSourcesMap (diff . NewConfig (), s1 , s2 )
150150 require .NoError (t , err )
151151 errs := checker .CheckBackwardCompatibilityUntilLevel (singleCheckConfig (checker .APIComponentsSecurityUpdatedCheck ), d , osm , checker .INFO )
152152 require .Len (t , errs , 1 )
@@ -168,7 +168,7 @@ func TestComponentSecurityOauthScopeUpdated(t *testing.T) {
168168
169169 s2 .Spec .Components .SecuritySchemes ["petstore_auth" ].Value .Flows .Implicit .Scopes ["read:pets" ] = "grants access to pets (deprecated)"
170170
171- d , osm , err := diff .GetWithOperationsSourcesMap (getConfig (), s1 , s2 )
171+ d , osm , err := diff .GetWithOperationsSourcesMap (diff . NewConfig (), s1 , s2 )
172172 require .NoError (t , err )
173173 errs := checker .CheckBackwardCompatibilityUntilLevel (singleCheckConfig (checker .APIComponentsSecurityUpdatedCheck ), d , osm , checker .INFO )
174174 require .Len (t , errs , 1 )
0 commit comments