diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-12-07 11:58:10 +0100 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2020-12-07 14:40:47 -0500 |
commit | 2ddb16d4c8ace2da51f4abd94efd463c637e8808 (patch) | |
tree | 91344faa11fa2c819eb4504e6077a12c62f298ab /test/system/030-run.bats | |
parent | 9b4266eb942b10926ea69ba13d84d5e36a61bd3c (diff) | |
download | podman-2ddb16d4c8ace2da51f4abd94efd463c637e8808.tar.gz podman-2ddb16d4c8ace2da51f4abd94efd463c637e8808.tar.bz2 podman-2ddb16d4c8ace2da51f4abd94efd463c637e8808.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>
<MH: Fixed cherry-pick conflicts>
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'test/system/030-run.bats')
-rw-r--r-- | test/system/030-run.bats | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/system/030-run.bats b/test/system/030-run.bats index 71831da10..bf7f67f7f 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -532,6 +532,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 "podman run with --net=host and --port prints warning" { run_podman run -d --rm -p 8080 --net=host $IMAGE ls > /dev/null is "$output" ".*Port mappings have been discarded as one of the Host, Container, Pod, and None network modes are in use" |