summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-02 03:22:25 -0400
committerGitHub <noreply@github.com>2020-10-02 03:22:25 -0400
commitdefd427503c2b36d64686b6ef327ce16810855c1 (patch)
tree330f534ffb7d4040b0ee7493560a76033a14575f
parent54a9ecc2629093ca58050a8f7418908bc209cec5 (diff)
parent7951a7f13a04f4f6b19e3c5fcc1ba293e905348a (diff)
downloadpodman-defd427503c2b36d64686b6ef327ce16810855c1.tar.gz
podman-defd427503c2b36d64686b6ef327ce16810855c1.tar.bz2
podman-defd427503c2b36d64686b6ef327ce16810855c1.zip
Merge pull request #7869 from vrothberg/system-untag
system test: untag all test
-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