mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-16 12:47:52 +00:00
"podman pull by digest and list --all" test: untag instead of rmi
The "podman pull by digest and list --all" e2e test pulls an image using
a tagged reference when an image with the same ID is already present in
a read-only additional image store.
This causes a new image record to be created in read-write storage.
The test then removes this entry, pulls the image again using a digested
reference, and then expects the image to not have any tagged names in it
when it goes to look at it again.
Newer containers/storage will ensure that at the point when the
read-write image record is created, that it includes all of the data
items and naming information from the read-only copy of the image, so
that this information doesn't appear to be lost.
Change the test to use "untag" instead of "rmi", which should pass with
either the older or newer containers/storage.
The test is checking that `podman images` doesn't choke when it
encounters a digested name attached to an image, so the difference in
behavior between containers/storage versions is irrelevant.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
(cherry picked from commit a428555e3e)
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
parent
0a9a5614c6
commit
02e250f3d2
1 changed files with 9 additions and 4 deletions
|
|
@ -217,7 +217,8 @@ WORKDIR /test
|
|||
})
|
||||
|
||||
It("podman pull by digest and list --all", func() {
|
||||
// Prevent regressing on issue #7651.
|
||||
// Prevent regressing on issue #7651: error parsing name that includes a digest
|
||||
// component as if were a name that includes tag component.
|
||||
digestPullAndList := func(noneTag bool) {
|
||||
session := podmanTest.Podman([]string{"pull", ALPINEAMD64DIGEST})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
|
@ -233,14 +234,18 @@ WORKDIR /test
|
|||
Expect(result.OutputToString()).To(Not(ContainSubstring("<none>")))
|
||||
}
|
||||
}
|
||||
// No "<none>" tag as tagged alpine instances should be present.
|
||||
// No "<none>" in the tag column as image tagged as "ALPINE" should be present in
|
||||
// the additional image store we're using. Pull the same image by another name to
|
||||
// copy an entry for the image into read-write storage so that the name can be
|
||||
// attached to it.
|
||||
session := podmanTest.Podman([]string{"pull", ALPINELISTTAG})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
digestPullAndList(false)
|
||||
|
||||
// Now remove all images, re-pull by digest and check for the "<none>" tag.
|
||||
session = podmanTest.Podman([]string{"rmi", "-af"})
|
||||
// Now remove all names from the read-write image record, re-pull by digest and
|
||||
// check for the "<none>" in its listing.
|
||||
session = podmanTest.Podman([]string{"untag", ALPINELISTTAG})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue