From 75419c5d887e23f93a465311b02bb76d8cea1940 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 26 Jul 2022 06:41:08 -0400 Subject: 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 --- test/system/160-volumes.bats | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/system/160-volumes.bats') diff --git a/test/system/160-volumes.bats b/test/system/160-volumes.bats index 18e806699..6829c6a78 100644 --- a/test/system/160-volumes.bats +++ b/test/system/160-volumes.bats @@ -473,4 +473,11 @@ EOF run_podman image rm --force localhost/volume_image } +@test "podman volume rm --force bogus" { + run_podman 1 volume rm bogus + is "$output" "Error: no volume with name \"bogus\" found: no such volume" "Should print error" + run_podman volume rm --force bogus + is "$output" "" "Should print no output" +} + # vim: filetype=sh -- cgit v1.2.3-54-g00ecf