File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
tools/cli/internal/openapi/filter Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -214,14 +214,15 @@ func Test_FilterOperations_moveSunsetToOperationAndMarkDeprecated(t *testing.T)
214214 }
215215
216216 // Assert the sunset to be filtered exists
217- require .Contains (t , f .oas .Paths .Find ("/path" ).Get .Responses .Map ()["200" ].Value .Content ["application/vnd.atlas.2023-01-01+json" ].Extensions , "x-sunset" )
217+ content := f .oas .Paths .Find ("/path" ).Get .Responses .Map ()["200" ].Value .Content ["application/vnd.atlas.2023-01-01+json" ]
218+ require .Contains (t , content .Extensions , "x-sunset" )
218219 require .False (t , f .oas .Paths .Find ("/path" ).Get .Deprecated )
219220 require .NoError (t , f .Apply ())
220221
221222 // Assert sunset was moved to operation
222223 require .Contains (t , f .oas .Paths .Find ("/path" ).Get .Extensions , "x-sunset" )
223224 require .NotContains (t , f .oas .Paths .Find ("/path" ).Get .Responses .Map ()["200" ].Extensions , "x-sunset" )
224- require .NotContains (t , f . oas . Paths . Find ( "/path" ). Get . Responses . Map ()[ "200" ]. Value . Content [ "application/vnd.atlas.2023-01-01+json" ] .Extensions , "x-sunset" )
225+ require .NotContains (t , content .Extensions , "x-sunset" )
225226 require .True (t , f .oas .Paths .Find ("/path" ).Get .Deprecated )
226227
227228 // Assert oas was not updated
You can’t perform that action at this time.
0 commit comments