From c187da23c49876f23a5b2fc0f4d94bedd44482e6 Mon Sep 17 00:00:00 2001 From: baude Date: Mon, 8 Jul 2019 09:51:56 -0500 Subject: speed up rootless tests when running integrations tests as rootless, several tests still unnecessarily pull images which is costly in terms of time. Signed-off-by: baude --- test/e2e/push_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/e2e/push_test.go') diff --git a/test/e2e/push_test.go b/test/e2e/push_test.go index de2416868..cf6279f2f 100644 --- a/test/e2e/push_test.go +++ b/test/e2e/push_test.go @@ -8,6 +8,7 @@ import ( "path/filepath" "strings" + "github.com/containers/libpod/pkg/rootless" . "github.com/containers/libpod/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -59,6 +60,9 @@ var _ = Describe("Podman push", func() { if podmanTest.Host.Arch == "ppc64le" { Skip("No registry image for ppc64le") } + if rootless.IsRootless() { + podmanTest.RestoreArtifact(registry) + } lock := GetPortLock("5000") defer lock.Unlock() session := podmanTest.PodmanNoCache([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"}) -- cgit v1.2.3-54-g00ecf