summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-12-07 11:58:10 +0100
committerValentin Rothberg <rothberg@redhat.com>2020-12-07 11:58:10 +0100
commitf294d89b5cae01f334e1798820f0de97c171d2df (patch)
tree129be5158e65ffa10d2cb7ffc6f9819f38655c6d /test
parent035d2891b79d9e44aca81ee449bbe7dc7d6ebe37 (diff)
downloadpodman-f294d89b5cae01f334e1798820f0de97c171d2df.tar.gz
podman-f294d89b5cae01f334e1798820f0de97c171d2df.tar.bz2
podman-f294d89b5cae01f334e1798820f0de97c171d2df.zip
container create: do not clear image name
When creating a container, do not clear the input-image name before looking up image names. Also add a regression test. Fixes: #8558 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/030-run.bats11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index 6db6b76f1..d6f1d471a 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -536,6 +536,17 @@ json-file | f
run_podman untag $IMAGE $newtag $newtag2
}
+# Regression test for issue #8558
+@test "podman run on untagged image: make sure that image metadata is set" {
+ run_podman inspect $IMAGE --format "{{.ID}}"
+ imageID="$output"
+
+ run_podman untag $IMAGE
+ run_podman run --rm $imageID ls
+
+ run_podman tag $imageID $IMAGE
+}
+
@test "Verify /run/.containerenv exist" {
run_podman run --rm $IMAGE ls -1 /run/.containerenv
is "$output" "/run/.containerenv"