aboutsummaryrefslogtreecommitdiff
path: root/test/system/055-rm.bats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-23 12:21:49 +0200
committerGitHub <noreply@github.com>2020-06-23 12:21:49 +0200
commitbbaba9fb8649035bf2c19488450a04beed5a1858 (patch)
treeba2b717970d87901304b9aefd5daff8e4f22675f /test/system/055-rm.bats
parentfc2c2ad1746da05393a2ca737360923e3f5a9f29 (diff)
parentd4504e6f53895e9f0125b560d0e01e697e96ac2e (diff)
downloadpodman-bbaba9fb8649035bf2c19488450a04beed5a1858.tar.gz
podman-bbaba9fb8649035bf2c19488450a04beed5a1858.tar.bz2
podman-bbaba9fb8649035bf2c19488450a04beed5a1858.zip
Merge pull request #6679 from edsantiago/bats
system tests: new rm, build tests
Diffstat (limited to 'test/system/055-rm.bats')
-rw-r--r--test/system/055-rm.bats12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/system/055-rm.bats b/test/system/055-rm.bats
index 8ef8a119e..6a381a187 100644
--- a/test/system/055-rm.bats
+++ b/test/system/055-rm.bats
@@ -21,6 +21,18 @@ load helpers
run_podman 125 inspect $rand
}
+@test "podman rm - running container, w/o and w/ force" {
+ run_podman run -d $IMAGE sleep 5
+ cid="$output"
+
+ # rm should fail
+ run_podman 2 rm $cid
+ is "$output" "Error: cannot remove container $cid as it is running - running or paused containers cannot be removed without force: container state improper" "error message"
+
+ # rm -f should succeed
+ run_podman rm -f $cid
+}
+
# I'm sorry! This test takes 13 seconds. There's not much I can do about it,
# please know that I think it's justified: podman 1.5.0 had a strange bug
# in with exit status was not preserved on some code paths with 'rm -f'