mirror of
https://github.com/containers/podman
synced 2024-10-19 08:44:11 +00:00
Merge pull request #14475 from vrothberg/fix-14468
test/e2e/save_test.go: fix flake
This commit is contained in:
commit
8f79604864
|
@ -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)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue