diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-10-07 14:47:52 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-10-09 06:06:08 -0400 |
commit | fea78d5530f996d008912584761433023491f160 (patch) | |
tree | 61fc3f7a53b77d53d7d9e1100b3d1ae8497a3794 /test/system/055-rm.bats | |
parent | 9ae873e60e149677db66782eaf2b4ed1402e97d2 (diff) | |
download | podman-fea78d5530f996d008912584761433023491f160.tar.gz podman-fea78d5530f996d008912584761433023491f160.tar.bz2 podman-fea78d5530f996d008912584761433023491f160.zip |
This PR allows users to remove external containers directly
Currenly if a user specifies the name or ID of an external storage
container, we report an error to them.
buildah from scratch
working-container-2
podman rm working-container-2
Error: no container with name or ID working-container-2 found: no such container
Since the user specified the correct name and the container is in storage we
force them to specify --storage to remove it. This is a bad experience for the
user.
This change will just remove the container from storage. If the container
is known by libpod, it will remove the container from libpod as well.
The podman rm --storage option has been deprecated, and removed from docs.
Also cleaned documented options that are not available to podman-remote.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/system/055-rm.bats')
-rw-r--r-- | test/system/055-rm.bats | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/system/055-rm.bats b/test/system/055-rm.bats index c8475c3e9..7176ae4b8 100644 --- a/test/system/055-rm.bats +++ b/test/system/055-rm.bats @@ -33,6 +33,21 @@ load helpers run_podman rm -f $cid } +@test "podman rm container from storage" { + if is_remote; then + skip "only applicable for local podman" + fi + rand=$(random_string 30) + run_podman create --name $rand $IMAGE /bin/true + + # Create a container that podman does not know about + run buildah from $IMAGE + cid="$output" + + # rm should succeed + run_podman rm $rand $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' |