diff options
author | Valentin Rothberg <vrothberg@redhat.com> | 2022-06-03 11:38:21 +0200 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2022-06-14 16:12:10 -0400 |
commit | 76adcce4c5623a4f432fd8a61c3833b4f89806b1 (patch) | |
tree | 9ea86ce6907938781b28812c1d95936e01d73d56 | |
parent | 1e0db6efe623a0bedbd520fb78142d741fa444de (diff) | |
download | podman-76adcce4c5623a4f432fd8a61c3833b4f89806b1.tar.gz podman-76adcce4c5623a4f432fd8a61c3833b4f89806b1.tar.bz2 podman-76adcce4c5623a4f432fd8a61c3833b4f89806b1.zip |
test/e2e/save_test.go: fix flake
Save at most three images and sort them by size. The test started to
flake as _all_ local images were saved which is not neccessary.
Fixes: #14468
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
-rw-r--r-- | test/e2e/save_test.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/e2e/save_test.go b/test/e2e/save_test.go index 897e49ef7..7a1fb0fc2 100644 --- a/test/e2e/save_test.go +++ b/test/e2e/save_test.go @@ -226,13 +226,17 @@ default-docker: }) It("podman save --multi-image-archive (untagged images)", func() { - // Refer to images via ID instead of tag. - session := podmanTest.Podman([]string{"images", "--format", "{{.ID}}"}) + // #14468: to make execution time more predictable, save at + // most three images and sort them by size. + session := podmanTest.Podman([]string{"images", "--sort", "size", "--format", "{{.ID}}"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) ids := session.OutputToStringArray() Expect(len(ids)).To(BeNumerically(">", 1), "We need to have *some* images to save") + if len(ids) > 3 { + ids = ids[:3] + } multiImageSave(podmanTest, ids) }) }) |