From d31f4e782d01cacb9f772002341f606ef408afb4 Mon Sep 17 00:00:00 2001 From: axel7083 <42176370+axel7083@users.noreply.github.com> Date: Fri, 21 Nov 2025 12:50:06 +0100 Subject: [PATCH] fix(api/compat): typo in the remove secret handle Fixes https://github.com/containers/podman/issues/27548 Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com> --- pkg/api/server/register_secrets.go | 2 +- test/apiv2/50-secrets.at | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) 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