summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-10-01 15:25:40 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-10-01 18:34:08 +0200
commit7951a7f13a04f4f6b19e3c5fcc1ba293e905348a (patch)
treed16840acae3d73ffd42b05d0dbed52cff83ca05b
parent556117c2e95bb0e4da7d36e10d94c3ec0ac4072f (diff)
downloadpodman-7951a7f13a04f4f6b19e3c5fcc1ba293e905348a.tar.gz
podman-7951a7f13a04f4f6b19e3c5fcc1ba293e905348a.tar.bz2
podman-7951a7f13a04f4f6b19e3c5fcc1ba293e905348a.zip
system test: untag all test
Extend the system tests to test `podman untag $image` without further arguments to force removing all tags from the image. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
-rw-r--r--test/system/020-tag.bats19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/system/020-tag.bats b/test/system/020-tag.bats
index 7593ad68f..1f5eede39 100644
--- a/test/system/020-tag.bats
+++ b/test/system/020-tag.bats
@@ -32,4 +32,23 @@ function _tag_and_check() {
is "$output" "Error: \"registry.com/foo:bar\": no such tag"
}
+@test "podman untag all" {
+ # First get the image ID
+ run_podman inspect --format '{{.ID}}' $IMAGE
+ iid=$output
+
+ # Add a couple of tags
+ run_podman tag $IMAGE registry.com/1:latest registry.com/2:latest registry.com/3:latest
+
+ # Untag with arguments to for all tags to be removed
+ run_podman untag $iid
+
+ # Now make sure all tags are removed
+ run_podman image inspect $iid --format "{{.RepoTags}}"
+ is "$output" "\[\]" "untag by ID leaves empty set of tags"
+
+ # Restore image
+ run_podman tag $iid $IMAGE
+}
+
# vim: filetype=sh