summaryrefslogtreecommitdiff
path: root/test/e2e/load_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/load_test.go')
-rw-r--r--test/e2e/load_test.go89
1 files changed, 44 insertions, 45 deletions
diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go
index e85a38c66..ffbb9b44f 100644
--- a/test/e2e/load_test.go
+++ b/test/e2e/load_test.go
@@ -24,7 +24,7 @@ var _ = Describe("Podman load", func() {
}
podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
- podmanTest.RestoreAllArtifacts()
+ podmanTest.AddImageToRWStore(ALPINE)
})
AfterEach(func() {
@@ -37,11 +37,11 @@ var _ = Describe("Podman load", func() {
It("podman load input flag", func() {
outfile := filepath.Join(podmanTest.TempDir, "alpine.tar")
- images := podmanTest.PodmanNoCache([]string{"images"})
+ images := podmanTest.Podman([]string{"images"})
images.WaitWithDefaultTimeout()
fmt.Println(images.OutputToStringArray())
- save := podmanTest.PodmanNoCache([]string{"save", "-o", outfile, ALPINE})
+ save := podmanTest.Podman([]string{"save", "-o", outfile, ALPINE})
save.WaitWithDefaultTimeout()
Expect(save.ExitCode()).To(Equal(0))
@@ -49,7 +49,7 @@ var _ = Describe("Podman load", func() {
rmi.WaitWithDefaultTimeout()
Expect(rmi.ExitCode()).To(Equal(0))
- result := podmanTest.PodmanNoCache([]string{"load", "-i", outfile})
+ result := podmanTest.Podman([]string{"load", "-i", outfile})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
})
@@ -57,7 +57,7 @@ var _ = Describe("Podman load", func() {
It("podman load compressed tar file", func() {
outfile := filepath.Join(podmanTest.TempDir, "alpine.tar")
- save := podmanTest.PodmanNoCache([]string{"save", "-o", outfile, ALPINE})
+ save := podmanTest.Podman([]string{"save", "-o", outfile, ALPINE})
save.WaitWithDefaultTimeout()
Expect(save.ExitCode()).To(Equal(0))
@@ -65,11 +65,11 @@ var _ = Describe("Podman load", func() {
Expect(compress.ExitCode()).To(Equal(0))
outfile = outfile + ".gz"
- rmi := podmanTest.PodmanNoCache([]string{"rmi", ALPINE})
+ rmi := podmanTest.Podman([]string{"rmi", ALPINE})
rmi.WaitWithDefaultTimeout()
Expect(rmi.ExitCode()).To(Equal(0))
- result := podmanTest.PodmanNoCache([]string{"load", "-i", outfile})
+ result := podmanTest.Podman([]string{"load", "-i", outfile})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
})
@@ -77,15 +77,15 @@ var _ = Describe("Podman load", func() {
It("podman load oci-archive image", func() {
outfile := filepath.Join(podmanTest.TempDir, "alpine.tar")
- save := podmanTest.PodmanNoCache([]string{"save", "-o", outfile, "--format", "oci-archive", ALPINE})
+ save := podmanTest.Podman([]string{"save", "-o", outfile, "--format", "oci-archive", ALPINE})
save.WaitWithDefaultTimeout()
Expect(save.ExitCode()).To(Equal(0))
- rmi := podmanTest.PodmanNoCache([]string{"rmi", ALPINE})
+ rmi := podmanTest.Podman([]string{"rmi", ALPINE})
rmi.WaitWithDefaultTimeout()
Expect(rmi.ExitCode()).To(Equal(0))
- result := podmanTest.PodmanNoCache([]string{"load", "-i", outfile})
+ result := podmanTest.Podman([]string{"load", "-i", outfile})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
})
@@ -93,15 +93,15 @@ var _ = Describe("Podman load", func() {
It("podman load oci-archive with signature", func() {
outfile := filepath.Join(podmanTest.TempDir, "alpine.tar")
- save := podmanTest.PodmanNoCache([]string{"save", "-o", outfile, "--format", "oci-archive", ALPINE})
+ save := podmanTest.Podman([]string{"save", "-o", outfile, "--format", "oci-archive", ALPINE})
save.WaitWithDefaultTimeout()
Expect(save.ExitCode()).To(Equal(0))
- rmi := podmanTest.PodmanNoCache([]string{"rmi", ALPINE})
+ rmi := podmanTest.Podman([]string{"rmi", ALPINE})
rmi.WaitWithDefaultTimeout()
Expect(rmi.ExitCode()).To(Equal(0))
- result := podmanTest.PodmanNoCache([]string{"load", "--signature-policy", "/etc/containers/policy.json", "-i", outfile})
+ result := podmanTest.Podman([]string{"load", "--signature-policy", "/etc/containers/policy.json", "-i", outfile})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
})
@@ -109,15 +109,15 @@ var _ = Describe("Podman load", func() {
It("podman load with quiet flag", func() {
outfile := filepath.Join(podmanTest.TempDir, "alpine.tar")
- save := podmanTest.PodmanNoCache([]string{"save", "-o", outfile, ALPINE})
+ save := podmanTest.Podman([]string{"save", "-o", outfile, ALPINE})
save.WaitWithDefaultTimeout()
Expect(save.ExitCode()).To(Equal(0))
- rmi := podmanTest.PodmanNoCache([]string{"rmi", ALPINE})
+ rmi := podmanTest.Podman([]string{"rmi", ALPINE})
rmi.WaitWithDefaultTimeout()
Expect(rmi.ExitCode()).To(Equal(0))
- result := podmanTest.PodmanNoCache([]string{"load", "-q", "-i", outfile})
+ result := podmanTest.Podman([]string{"load", "-q", "-i", outfile})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
})
@@ -126,7 +126,7 @@ var _ = Describe("Podman load", func() {
SkipIfRemote("Remote does not support loading directories")
outdir := filepath.Join(podmanTest.TempDir, "alpine")
- save := podmanTest.PodmanNoCache([]string{"save", "--format", "oci-dir", "-o", outdir, ALPINE})
+ save := podmanTest.Podman([]string{"save", "--format", "oci-dir", "-o", outdir, ALPINE})
save.WaitWithDefaultTimeout()
Expect(save.ExitCode()).To(Equal(0))
@@ -156,7 +156,7 @@ var _ = Describe("Podman load", func() {
})
It("podman load bogus file", func() {
- save := podmanTest.PodmanNoCache([]string{"load", "-i", "foobar.tar"})
+ save := podmanTest.Podman([]string{"load", "-i", "foobar.tar"})
save.WaitWithDefaultTimeout()
Expect(save).To(ExitWithError())
})
@@ -168,75 +168,74 @@ var _ = Describe("Podman load", func() {
outfile := filepath.Join(podmanTest.TempDir, "alpine.tar")
alpVersion := "quay.io/libpod/alpine:3.2"
- pull := podmanTest.PodmanNoCache([]string{"pull", alpVersion})
+ pull := podmanTest.Podman([]string{"pull", alpVersion})
pull.WaitWithDefaultTimeout()
Expect(pull.ExitCode()).To(Equal(0))
- save := podmanTest.PodmanNoCache([]string{"save", "-o", outfile, ALPINE, alpVersion})
+ save := podmanTest.Podman([]string{"save", "-o", outfile, ALPINE, alpVersion})
save.WaitWithDefaultTimeout()
Expect(save.ExitCode()).To(Equal(0))
- rmi := podmanTest.PodmanNoCache([]string{"rmi", ALPINE, alpVersion})
+ rmi := podmanTest.Podman([]string{"rmi", ALPINE, alpVersion})
rmi.WaitWithDefaultTimeout()
Expect(rmi.ExitCode()).To(Equal(0))
- result := podmanTest.PodmanNoCache([]string{"load", "-i", outfile})
+ result := podmanTest.Podman([]string{"load", "-i", outfile})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
- inspect := podmanTest.PodmanNoCache([]string{"inspect", ALPINE})
+ inspect := podmanTest.Podman([]string{"inspect", ALPINE})
inspect.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
- inspect = podmanTest.PodmanNoCache([]string{"inspect", alpVersion})
+ inspect = podmanTest.Podman([]string{"inspect", alpVersion})
inspect.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
})
It("podman load localhost registry from scratch", func() {
outfile := filepath.Join(podmanTest.TempDir, "load_test.tar.gz")
- setup := podmanTest.PodmanNoCache([]string{"tag", ALPINE, "hello:world"})
+ setup := podmanTest.Podman([]string{"tag", ALPINE, "hello:world"})
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
- setup = podmanTest.PodmanNoCache([]string{"save", "-o", outfile, "--format", "oci-archive", "hello:world"})
+ setup = podmanTest.Podman([]string{"save", "-o", outfile, "--format", "oci-archive", "hello:world"})
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
- setup = podmanTest.PodmanNoCache([]string{"rmi", "hello:world"})
+ setup = podmanTest.Podman([]string{"rmi", "hello:world"})
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
- load := podmanTest.PodmanNoCache([]string{"load", "-i", outfile})
+ load := podmanTest.Podman([]string{"load", "-i", outfile})
load.WaitWithDefaultTimeout()
Expect(load.ExitCode()).To(Equal(0))
- result := podmanTest.PodmanNoCache([]string{"images", "hello:world"})
+ result := podmanTest.Podman([]string{"images", "hello:world"})
result.WaitWithDefaultTimeout()
Expect(result.LineInOutputContains("docker")).To(Not(BeTrue()))
Expect(result.LineInOutputContains("localhost")).To(BeTrue())
})
It("podman load localhost registry from scratch and :latest", func() {
- podmanTest.RestoreArtifact(fedoraMinimal)
outfile := filepath.Join(podmanTest.TempDir, "load_test.tar.gz")
- setup := podmanTest.PodmanNoCache([]string{"tag", fedoraMinimal, "hello"})
+ setup := podmanTest.Podman([]string{"tag", ALPINE, "hello"})
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
- setup = podmanTest.PodmanNoCache([]string{"save", "-o", outfile, "--format", "oci-archive", "hello"})
+ setup = podmanTest.Podman([]string{"save", "-o", outfile, "--format", "oci-archive", "hello"})
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
- setup = podmanTest.PodmanNoCache([]string{"rmi", "hello"})
+ setup = podmanTest.Podman([]string{"rmi", "hello"})
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
- load := podmanTest.PodmanNoCache([]string{"load", "-i", outfile})
+ load := podmanTest.Podman([]string{"load", "-i", outfile})
load.WaitWithDefaultTimeout()
Expect(load.ExitCode()).To(Equal(0))
- result := podmanTest.PodmanNoCache([]string{"images", "hello:latest"})
+ result := podmanTest.Podman([]string{"images", "hello:latest"})
result.WaitWithDefaultTimeout()
Expect(result.LineInOutputContains("docker")).To(Not(BeTrue()))
Expect(result.LineInOutputContains("localhost")).To(BeTrue())
@@ -246,48 +245,48 @@ var _ = Describe("Podman load", func() {
SkipIfRemote("podman-remote does not support loading directories")
outfile := filepath.Join(podmanTest.TempDir, "load")
- setup := podmanTest.PodmanNoCache([]string{"tag", BB, "hello:world"})
+ setup := podmanTest.Podman([]string{"tag", ALPINE, "hello:world"})
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
- setup = podmanTest.PodmanNoCache([]string{"save", "-o", outfile, "--format", "oci-dir", "hello:world"})
+ setup = podmanTest.Podman([]string{"save", "-o", outfile, "--format", "oci-dir", "hello:world"})
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
- setup = podmanTest.PodmanNoCache([]string{"rmi", "hello:world"})
+ setup = podmanTest.Podman([]string{"rmi", "hello:world"})
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
- load := podmanTest.PodmanNoCache([]string{"load", "-i", outfile})
+ load := podmanTest.Podman([]string{"load", "-i", outfile})
load.WaitWithDefaultTimeout()
Expect(load.ExitCode()).To(Equal(0))
- result := podmanTest.PodmanNoCache([]string{"images", "load:latest"})
+ result := podmanTest.Podman([]string{"images", "load:latest"})
result.WaitWithDefaultTimeout()
Expect(result.LineInOutputContains("docker")).To(Not(BeTrue()))
Expect(result.LineInOutputContains("localhost")).To(BeTrue())
})
It("podman load xz compressed image", func() {
- outfile := filepath.Join(podmanTest.TempDir, "bb.tar")
+ outfile := filepath.Join(podmanTest.TempDir, "alp.tar")
- save := podmanTest.PodmanNoCache([]string{"save", "-o", outfile, BB})
+ save := podmanTest.Podman([]string{"save", "-o", outfile, ALPINE})
save.WaitWithDefaultTimeout()
Expect(save.ExitCode()).To(Equal(0))
session := SystemExec("xz", []string{outfile})
Expect(session.ExitCode()).To(Equal(0))
- rmi := podmanTest.PodmanNoCache([]string{"rmi", BB})
+ rmi := podmanTest.Podman([]string{"rmi", ALPINE})
rmi.WaitWithDefaultTimeout()
Expect(rmi.ExitCode()).To(Equal(0))
- result := podmanTest.PodmanNoCache([]string{"load", "-i", outfile + ".xz"})
+ result := podmanTest.Podman([]string{"load", "-i", outfile + ".xz"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
})
It("podman load multi-image archive", func() {
- result := podmanTest.PodmanNoCache([]string{"load", "-i", "./testdata/image/docker-two-images.tar.xz"})
+ result := podmanTest.Podman([]string{"load", "-i", "./testdata/image/docker-two-images.tar.xz"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
Expect(result.LineInOutputContains("example.com/empty:latest")).To(BeTrue())