summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-11-22 13:48:14 +0100
committerValentin Rothberg <rothberg@redhat.com>2021-11-23 11:15:03 +0100
commit0d1aaf080eb116f1e8e23cd55a8bca0ed5f2e596 (patch)
treecdb32b1680f23d5d501af445cb345d539eb0dc36 /test
parenta55473bea80c2d9e5d79ac97a2bfe313622033f9 (diff)
downloadpodman-0d1aaf080eb116f1e8e23cd55a8bca0ed5f2e596.tar.gz
podman-0d1aaf080eb116f1e8e23cd55a8bca0ed5f2e596.tar.bz2
podman-0d1aaf080eb116f1e8e23cd55a8bca0ed5f2e596.zip
image lookup: do not match *any* tags
For reasons buried in the history of Podman, looking up an untagged image would match any tag of matching image. For instance, looking up centos would match a local image centos:foobar. Change that behavior to only match the latest tag. Fix: #11964 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pull_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go
index c377f158d..fdb1b0c57 100644
--- a/test/e2e/pull_test.go
+++ b/test/e2e/pull_test.go
@@ -48,7 +48,7 @@ var _ = Describe("Podman pull", func() {
found, _ := session.ErrorGrepString(expectedError)
Expect(found).To(Equal(true))
- session = podmanTest.Podman([]string{"rmi", "busybox", "alpine", "testdigest_v2s2", "quay.io/libpod/cirros"})
+ session = podmanTest.Podman([]string{"rmi", "busybox:musl", "alpine", "quay.io/libpod/cirros", "testdigest_v2s2@sha256:755f4d90b3716e2bf57060d249e2cd61c9ac089b1233465c5c2cb2d7ee550fdb"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
})
@@ -104,8 +104,13 @@ var _ = Describe("Podman pull", func() {
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
+ // Without a tag/digest the input is normalized with the "latest" tag, see #11964
session = podmanTest.Podman([]string{"rmi", "testdigest_v2s2"})
session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(1))
+
+ session = podmanTest.Podman([]string{"rmi", "testdigest_v2s2@sha256:755f4d90b3716e2bf57060d249e2cd61c9ac089b1233465c5c2cb2d7ee550fdb"})
+ session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
})