diff options
author | Brent Baude <bbaude@redhat.com> | 2022-02-15 12:31:20 -0600 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2022-02-18 11:51:46 -0500 |
commit | ce5359f54ce0c2c74ddb198c87591796c0c70329 (patch) | |
tree | 6886108a565edbfdf70c5d08a6283625d792a1ea | |
parent | a54320a793c156e13d6880f7e898ac8232623a60 (diff) | |
download | podman-ce5359f54ce0c2c74ddb198c87591796c0c70329.tar.gz podman-ce5359f54ce0c2c74ddb198c87591796c0c70329.tar.bz2 podman-ce5359f54ce0c2c74ddb198c87591796c0c70329.zip |
Fix images since/after tests
For the since and after imagve filter tests, instead of using the
read-only cache of images, we just use the empty r/w store. We then
build three images that are strictly predictable.
Signed-off-by: Brent Baude <bbaude@redhat.com>
-rw-r--r-- | test/e2e/images_test.go | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go index 3a9f3f513..5492860b3 100644 --- a/test/e2e/images_test.go +++ b/test/e2e/images_test.go @@ -188,23 +188,27 @@ WORKDIR /test }) It("podman images filter since image", func() { - dockerfile := `FROM quay.io/libpod/alpine:latest + dockerfile := `FROM scratch ` - podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false") - result := podmanTest.Podman([]string{"images", "-q", "-f", "since=quay.io/libpod/alpine:latest"}) + podmanTest.BuildImage(dockerfile, "foobar.com/one:latest", "false") + podmanTest.BuildImage(dockerfile, "foobar.com/two:latest", "false") + podmanTest.BuildImage(dockerfile, "foobar.com/three:latest", "false") + result := podmanTest.PodmanNoCache([]string{"images", "-q", "-f", "since=foobar.com/one:latest"}) result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) - Expect(len(result.OutputToStringArray())).To(Equal(9)) + Expect(result.OutputToStringArray()).To(HaveLen(2)) }) It("podman image list filter after image", func() { - dockerfile := `FROM quay.io/libpod/alpine:latest + dockerfile := `FROM scratch ` - podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false") - result := podmanTest.Podman([]string{"image", "list", "-q", "-f", "after=quay.io/libpod/alpine:latest"}) + podmanTest.BuildImage(dockerfile, "foobar.com/one:latest", "false") + podmanTest.BuildImage(dockerfile, "foobar.com/two:latest", "false") + podmanTest.BuildImage(dockerfile, "foobar.com/three:latest", "false") + result := podmanTest.Podman([]string{"image", "list", "-q", "-f", "after=foobar.com/one:latest"}) result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) - Expect(result.OutputToStringArray()).Should(HaveLen(9), "list filter output: %q", result.OutputToString()) + Expect(result.OutputToStringArray()).Should(HaveLen(2), "list filter output: %q", result.OutputToString()) }) It("podman images filter dangling", func() { |