fix aggregator path filtering to include /

This commit is contained in:
Jefftree
2024-03-06 13:01:18 -05:00
parent 546f7c3086
commit 8373f3035a
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