Merge pull request #123770 from Jefftree/go-restful

fix aggregator path filtering to include /
This commit is contained in:
Kubernetes Prow Robot
2024-03-07 10:21:53 -08:00
committed by GitHub
3 changed files with 49 additions and 47 deletions

View File

@@ -119,7 +119,7 @@ func TestFetchingOpenAPIBeforeReady(t *testing.T) {
SwaggerProps: spec.SwaggerProps{
Paths: &spec.Paths{
Paths: map[string]spec.PathItem{
"/apis/wardle.example.com/v1alpha1": {},
"/apis/wardle.example.com/v1alpha1/": {},
},
},
},
@@ -150,7 +150,7 @@ func TestFetchingOpenAPIBeforeReady(t *testing.T) {
require.NoError(t, err)
var openapi spec.Swagger
require.NoError(t, openapi.UnmarshalJSON(b))
if _, ok := openapi.Paths.Paths["/apis/wardle.example.com/v1alpha1"]; ok {
if _, ok := openapi.Paths.Paths["/apis/wardle.example.com/v1alpha1/"]; ok {
return true, nil
}
return false, nil