summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-03-09 16:39:01 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-03-10 04:08:29 -0500
commitf1eb8e816257d9dc810cfa6957e09db1ffa7db96 (patch)
treeed0bbddcfec6d2a58004ccaa2610a3fd673f9b0e /test
parent09473d43001f5818dbb178cba81f2f61e3de1457 (diff)
downloadpodman-f1eb8e816257d9dc810cfa6957e09db1ffa7db96.tar.gz
podman-f1eb8e816257d9dc810cfa6957e09db1ffa7db96.tar.bz2
podman-f1eb8e816257d9dc810cfa6957e09db1ffa7db96.zip
Removing a non existing container API should return 404
Currently we were overwrapping error returned from removal of a non existing container. $ podman rm bogus -f Error: failed to evict container: "": failed to find container "bogus" in state: no container with name or ID bogus found: no such container Removal of wraps gets us to. ./bin/podman rm bogus -f Error: no container with name or ID "bogus" found: no such container Finally also added quotes around container name to help make it standout when you get an error, currently it gets lost in the error. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/20-containers.at1
-rw-r--r--test/system/050-stop.bats2
2 files changed, 2 insertions, 1 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index f73d03123..383d92ef3 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -162,6 +162,7 @@ t DELETE images/localhost/newrepo:v1?force=true 200
t DELETE images/localhost/newrepo:v2?force=true 200
t DELETE libpod/containers/$cid 204
t DELETE libpod/containers/myctr 204
+t DELETE libpod/containers/bogus 404
# test apiv2 create container with correct entrypoint and cmd
diff --git a/test/system/050-stop.bats b/test/system/050-stop.bats
index 7d9f1fcb3..0652a97e4 100644
--- a/test/system/050-stop.bats
+++ b/test/system/050-stop.bats
@@ -66,7 +66,7 @@ load helpers
name=thiscontainerdoesnotexist
run_podman 125 stop $name
is "$output" \
- "Error: no container with name or ID $name found: no such container" \
+ "Error: no container with name or ID \"$name\" found: no such container" \
"podman stop nonexistent container"
run_podman stop --ignore $name