summaryrefslogtreecommitdiff
path: root/test/system/200-pod.bats
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-07-26 06:41:08 -0400
committerMatthew Heon <mheon@redhat.com>2022-08-10 16:46:05 -0400
commit32848b95f6fcf9e8dcd51f23f43846d66886f1ac (patch)
treea3b5ece563a8cc7cc096eb0703f901279dc12a39 /test/system/200-pod.bats
parent312bef288bd7b7cd2e52d25e4f5911f730fad4e8 (diff)
downloadpodman-32848b95f6fcf9e8dcd51f23f43846d66886f1ac.tar.gz
podman-32848b95f6fcf9e8dcd51f23f43846d66886f1ac.tar.bz2
podman-32848b95f6fcf9e8dcd51f23f43846d66886f1ac.zip
When removing objects specifying --force,podman should exit with 0
This Patch will cause podman COMMAND rm --force bogus not fail This is how Docker works, so Podman should follow this to allow existing scripts to convert from Docker to Podman. Fixes: #14612 Oprignal version of this patch came from wufan 1991849113@qq.com Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/system/200-pod.bats')
-rw-r--r--test/system/200-pod.bats7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/system/200-pod.bats b/test/system/200-pod.bats
index 7b7f5e8bb..8d884f6af 100644
--- a/test/system/200-pod.bats
+++ b/test/system/200-pod.bats
@@ -517,4 +517,11 @@ spec:
wait
}
+@test "podman pod rm --force bogus" {
+ run_podman 1 pod rm bogus
+ is "$output" "Error: .*bogus.*: no such pod" "Should print error"
+ run_podman pod rm --force bogus
+ is "$output" "" "Should print no output"
+}
+
# vim: filetype=sh