summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-12 21:27:09 +0200
committerGitHub <noreply@github.com>2021-10-12 21:27:09 +0200
commitc90beedbe160eb6e8094b492091231f3c5838006 (patch)
tree128d2f9660ed3b1fdac69d50cba8e32ddec4f2a4 /test
parent03095bd090e067ef1a2978a2107ec07ff3f95a2c (diff)
parent7580c227348af2a0906a692ad6a44348dc3eefbc (diff)
downloadpodman-c90beedbe160eb6e8094b492091231f3c5838006.tar.gz
podman-c90beedbe160eb6e8094b492091231f3c5838006.tar.bz2
podman-c90beedbe160eb6e8094b492091231f3c5838006.zip
Merge pull request #11925 from rhatdan/volume
Remove a volume with --force if container is running
Diffstat (limited to 'test')
-rw-r--r--test/system/160-volumes.bats8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/system/160-volumes.bats b/test/system/160-volumes.bats
index 490d635e5..7128f1b65 100644
--- a/test/system/160-volumes.bats
+++ b/test/system/160-volumes.bats
@@ -97,6 +97,14 @@ Labels.l | $mylabel
run_podman volume rm $myvolume
}
+# Removing volumes with --force
+@test "podman volume rm --force" {
+ run_podman run -d --volume myvol:/myvol $IMAGE top
+ cid=$output
+ run_podman 2 volume rm myvol
+ is "$output" "Error: volume myvol is being used by the following container(s): $cid: volume is being used" "should error since container is running"
+ run_podman volume rm myvol --force
+}
# Running scripts (executables) from a volume
@test "podman volume: exec/noexec" {