diff options
Diffstat (limited to 'test/e2e/load_test.go')
-rw-r--r-- | test/e2e/load_test.go | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go index 3fe68ad8e..d39f75927 100644 --- a/test/e2e/load_test.go +++ b/test/e2e/load_test.go @@ -161,4 +161,60 @@ var _ = Describe("Podman load", func() { inspect.WaitWithDefaultTimeout() Expect(result.ExitCode()).To(Equal(0)) }) + + It("podman load localhost repo from scratch", func() { + outfile := filepath.Join(podmanTest.TempDir, "load_test.tar.gz") + setup := podmanTest.Podman([]string{"pull", fedoraMinimal}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"tag", "fedora-minimal", "hello:world"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"save", "-o", outfile, "--format", "oci-archive", "hello:world"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"rmi", "hello:world"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + load := podmanTest.Podman([]string{"load", "-i", outfile}) + load.WaitWithDefaultTimeout() + Expect(load.ExitCode()).To(Equal(0)) + + result := podmanTest.Podman([]string{"images", "-f", "label", "hello:world"}) + result.WaitWithDefaultTimeout() + Expect(result.LineInOutputContains("docker")).To(Not(BeTrue())) + Expect(result.LineInOutputContains("localhost")).To(BeTrue()) + }) + + It("podman load localhost repo from dir", func() { + outfile := filepath.Join(podmanTest.TempDir, "load") + setup := podmanTest.Podman([]string{"pull", fedoraMinimal}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"tag", "fedora-minimal", "hello:world"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"save", "-o", outfile, "--format", "oci-dir", "hello:world"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"rmi", "hello:world"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + load := podmanTest.Podman([]string{"load", "-i", outfile}) + load.WaitWithDefaultTimeout() + Expect(load.ExitCode()).To(Equal(0)) + + result := podmanTest.Podman([]string{"images", "-f", "label", "load:latest"}) + result.WaitWithDefaultTimeout() + Expect(result.LineInOutputContains("docker")).To(Not(BeTrue())) + Expect(result.LineInOutputContains("localhost")).To(BeTrue()) + }) }) |