diff --git a/pkg/api/server/register_secrets.go b/pkg/api/server/register_secrets.go index 01307fdc80..b9d2f295e1 100644 --- a/pkg/api/server/register_secrets.go +++ b/pkg/api/server/register_secrets.go @@ -236,7 +236,7 @@ func (s *APIServer) registerSecretHandlers(r *mux.Router) error { // '500': // "$ref": "#/responses/internalError" r.Handle(VersionedPath("/secrets/{name}"), s.APIHandler(compat.RemoveSecret)).Methods(http.MethodDelete) - r.Handle("/secret/{name}", s.APIHandler(compat.RemoveSecret)).Methods(http.MethodDelete) + r.Handle("/secrets/{name}", s.APIHandler(compat.RemoveSecret)).Methods(http.MethodDelete) r.Handle(VersionedPath("/secrets/{name}/update"), s.APIHandler(compat.UpdateSecret)).Methods(http.MethodPost) r.Handle("/secrets/{name}/update", s.APIHandler(compat.UpdateSecret)).Methods(http.MethodPost) diff --git a/test/apiv2/50-secrets.at b/test/apiv2/50-secrets.at index f0449e600e..0156d36309 100644 --- a/test/apiv2/50-secrets.at +++ b/test/apiv2/50-secrets.at @@ -76,3 +76,11 @@ t DELETE secrets/bogus 404 # secret update not implemented t POST secrets/mysecret/update 501 + +# compat api +t POST /secrets/create Name=foosecret Data=c2VjcmV0 200 + +t GET /secrets/foosecret 200 \ + .Spec.Name=foosecret + +t DELETE /secrets/foosecret 204