Skip to content

Commit

Permalink
Addd negative case for the fix in #123570
Browse files Browse the repository at this point in the history
Kubernetes-commit: 4a5fe2decad41c4a14b06f66397b547908bcdf1c
  • Loading branch information
hakuna-matatah authored and k8s-publishing-bot committed Mar 5, 2024
1 parent 2e25c05 commit 4133c02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/controllers/openapi/aggregator/aggregator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ func TestAPIServiceOpenAPIServiceMismatch(t *testing.T) {
expectPath(t, swagger, "/apis/apiservicegroup/v1")
expectPath(t, swagger, "/apis/apiservicegroup/v2")
expectPath(t, swagger, "/apis/apiregistration.k8s.io/v1")
expectNoPath(t, swagger, "/apis/a")

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

func TestAddRemoveAPIService(t *testing.T) {
Expand Down

0 comments on commit 4133c02

Please sign in to comment.