mirror of
https://github.com/containers/podman.git
synced 2025-12-04 12:17:34 +08:00
If API calls for kube play --replace, then replace pod
Currently if user specifies podman kube play --replace, the pod is removed on the client side, not the server side. If the API is called with replace=true, the pod was not being removed and this called the API to fail. This PR removes the pod if it exists and the caller specifies replace=true. Fixes: https://github.com/containers/podman/discussions/20705 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@@ -48,6 +48,13 @@ t POST libpod/kube/play $YAML 200 \
|
||||
.Pods[0].ContainerErrors=null \
|
||||
.Pods[0].Containers[0]~[0-9a-f]\\{64\\}
|
||||
|
||||
t POST libpod/kube/play $YAML 500
|
||||
|
||||
t POST 'libpod/kube/play?replace=true' $YAML 200 \
|
||||
.Pods[0].ID~[0-9a-f]\\{64\\} \
|
||||
.Pods[0].ContainerErrors=null \
|
||||
.Pods[0].Containers[0]~[0-9a-f]\\{64\\}
|
||||
|
||||
t DELETE libpod/kube/play $YAML 200 \
|
||||
.StopReport[0].Id~[0-9a-f]\\{64\\} \
|
||||
.RmReport[0].Id~[0-9a-f]\\{64\\}
|
||||
|
||||
Reference in New Issue
Block a user