Skip to content

Commit 1667b43

Browse files
committed
Lint
1 parent 55891ca commit 1667b43

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/cli/internal/openapi/filter/versioning_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)