summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-01-18 14:49:53 -0500
committerMatthew Heon <matthew.heon@pm.me>2021-02-08 13:57:45 -0500
commitefcffde620f74316492fe08f71f022e1cfab2351 (patch)
treed1fecefea54642b7b3b3342f94776d98f5cbdb2f /test/system
parentbcf7d4383d532477ea97511e6565ed00480ad8b8 (diff)
downloadpodman-efcffde620f74316492fe08f71f022e1cfab2351.tar.gz
podman-efcffde620f74316492fe08f71f022e1cfab2351.tar.bz2
podman-efcffde620f74316492fe08f71f022e1cfab2351.zip
Fix handling of container remove
I found several problems with container remove podman-remote rm --all Was not handled podman-remote rm --ignore Was not handled Return better errors when attempting to remove an --external container. Currently we return the container does not exists, as opposed to container is an external container that is being used. This patch also consolidates the tunnel code to use the same code for removing the container, as the local API, removing duplication of code and potential problems. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/system')
-rw-r--r--test/system/040-ps.bats7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/system/040-ps.bats b/test/system/040-ps.bats
index 0447122b1..0ae8b0ce0 100644
--- a/test/system/040-ps.bats
+++ b/test/system/040-ps.bats
@@ -111,8 +111,11 @@ EOF
run_podman ps --storage -a
is "${#lines[@]}" "2" "podman ps -a --storage sees buildah container"
- # This is what deletes the container
- # FIXME: why doesn't "podman rm --storage $cid" do anything?
+ # We can't rm it without -f, but podman should issue a helpful message
+ run_podman 2 rm "$cid"
+ is "$output" "Error: container .* is mounted and cannot be removed without using force: container state improper" "podman rm <buildah container> without -f"
+
+ # With -f, we can remove it.
run_podman rm -f "$cid"
run_podman ps --storage -a