Skip to content

Commit 4133c02

Browse files
hakuna-matatahk8s-publishing-bot
authored andcommitted
Addd negative case for the fix in #123570
Kubernetes-commit: 4a5fe2decad41c4a14b06f66397b547908bcdf1c
1 parent 2e25c05 commit 4133c02

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/controllers/openapi/aggregator/aggregator_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ func TestAPIServiceOpenAPIServiceMismatch(t *testing.T) {
210210
expectPath(t, swagger, "/apis/apiservicegroup/v1")
211211
expectPath(t, swagger, "/apis/apiservicegroup/v2")
212212
expectPath(t, swagger, "/apis/apiregistration.k8s.io/v1")
213+
expectNoPath(t, swagger, "/apis/a")
213214

214215
t.Logf("Remove APIService %s", apiService.Name)
215216
s.RemoveAPIService(apiService.Name)
@@ -221,6 +222,7 @@ func TestAPIServiceOpenAPIServiceMismatch(t *testing.T) {
221222
// Ensure that the if the APIService is added then removed, the OpenAPI disappears from the aggregated OpenAPI as well.
222223
expectNoPath(t, swagger, "/apis/apiservicegroup/v1")
223224
expectPath(t, swagger, "/apis/apiregistration.k8s.io/v1")
225+
expectNoPath(t, swagger, "/apis/a")
224226
}
225227

226228
func TestAddRemoveAPIService(t *testing.T) {

0 commit comments

Comments
 (0)