diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/config_amd64.go | 4 | ||||
-rw-r--r-- | test/e2e/config_ppc64le.go | 4 | ||||
-rw-r--r-- | test/e2e/pause_test.go | 62 | ||||
-rw-r--r-- | test/e2e/pull_test.go | 4 | ||||
-rw-r--r-- | test/e2e/restart_test.go | 40 | ||||
-rw-r--r-- | test/e2e/run_test.go | 4 |
6 files changed, 110 insertions, 8 deletions
diff --git a/test/e2e/config_amd64.go b/test/e2e/config_amd64.go index 268f88f26..3459bea6d 100644 --- a/test/e2e/config_amd64.go +++ b/test/e2e/config_amd64.go @@ -4,8 +4,8 @@ var ( STORAGE_OPTIONS = "--storage-driver vfs" ROOTLESS_STORAGE_OPTIONS = "--storage-driver vfs" CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, nginx, redis, registry, infra, labels} - nginx = "quay.io/baude/alpine_nginx:latest" + nginx = "quay.io/libpod/alpine_nginx:latest" BB_GLIBC = "docker.io/library/busybox:glibc" registry = "docker.io/library/registry:2" - labels = "quay.io/baude/alpine_labels:latest" + labels = "quay.io/libpod/alpine_labels:latest" ) diff --git a/test/e2e/config_ppc64le.go b/test/e2e/config_ppc64le.go index 8c821fc7f..d1737fa6f 100644 --- a/test/e2e/config_ppc64le.go +++ b/test/e2e/config_ppc64le.go @@ -4,8 +4,8 @@ var ( STORAGE_OPTIONS = "--storage-driver overlay" ROOTLESS_STORAGE_OPTIONS = "--storage-driver vfs" CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, nginx, redis, infra, labels} - nginx = "quay.io/baude/alpine_nginx-ppc64le:latest" + nginx = "quay.io/libpod/alpine_nginx-ppc64le:latest" BB_GLIBC = "docker.io/ppc64le/busybox:glibc" - labels = "quay.io/baude/alpine_labels-ppc64le:latest" + labels = "quay.io/libpod/alpine_labels-ppc64le:latest" registry string ) diff --git a/test/e2e/pause_test.go b/test/e2e/pause_test.go index c34964f59..24876b6d6 100644 --- a/test/e2e/pause_test.go +++ b/test/e2e/pause_test.go @@ -213,4 +213,66 @@ var _ = Describe("Podman pause", func() { result.WaitWithDefaultTimeout() }) + It("Pause all containers (no containers exist)", func() { + result := podmanTest.Podman([]string{"pause", "--all"}) + result.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0)) + + }) + + It("Unpause all containers (no paused containers exist)", func() { + result := podmanTest.Podman([]string{"unpause", "--all"}) + result.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0)) + }) + + It("Pause a bunch of running containers", func() { + podmanTest.RestoreArtifact(nginx) + for i := 0; i < 3; i++ { + name := fmt.Sprintf("test%d", i) + run := podmanTest.Podman([]string{"run", "-dt", "--name", name, nginx}) + run.WaitWithDefaultTimeout() + Expect(run.ExitCode()).To(Equal(0)) + + } + running := podmanTest.Podman([]string{"ps", "-q"}) + running.WaitWithDefaultTimeout() + Expect(running.ExitCode()).To(Equal(0)) + Expect(len(running.OutputToStringArray())).To(Equal(3)) + + pause := podmanTest.Podman([]string{"pause", "--all"}) + pause.WaitWithDefaultTimeout() + Expect(pause.ExitCode()).To(Equal(0)) + + running = podmanTest.Podman([]string{"ps", "-q"}) + running.WaitWithDefaultTimeout() + Expect(running.ExitCode()).To(Equal(0)) + Expect(len(running.OutputToStringArray())).To(Equal(0)) + }) + + It("Unpause a bunch of running containers", func() { + podmanTest.RestoreArtifact(nginx) + for i := 0; i < 3; i++ { + name := fmt.Sprintf("test%d", i) + run := podmanTest.Podman([]string{"run", "-dt", "--name", name, nginx}) + run.WaitWithDefaultTimeout() + Expect(run.ExitCode()).To(Equal(0)) + + } + pause := podmanTest.Podman([]string{"pause", "--all"}) + pause.WaitWithDefaultTimeout() + Expect(pause.ExitCode()).To(Equal(0)) + + unpause := podmanTest.Podman([]string{"unpause", "--all"}) + unpause.WaitWithDefaultTimeout() + Expect(unpause.ExitCode()).To(Equal(0)) + + running := podmanTest.Podman([]string{"ps", "-q"}) + running.WaitWithDefaultTimeout() + Expect(running.ExitCode()).To(Equal(0)) + Expect(len(running.OutputToStringArray())).To(Equal(3)) + }) + }) diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go index 821476f39..606160198 100644 --- a/test/e2e/pull_test.go +++ b/test/e2e/pull_test.go @@ -63,11 +63,11 @@ var _ = Describe("Podman pull", func() { }) It("podman pull from alternate registry without tag", func() { - session := podmanTest.Podman([]string{"pull", "quay.io/baude/alpine_nginx"}) + session := podmanTest.Podman([]string{"pull", "quay.io/libpod/alpine_nginx"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) - session = podmanTest.Podman([]string{"rmi", "quay.io/baude/alpine_nginx"}) + session = podmanTest.Podman([]string{"rmi", "quay.io/libpod/alpine_nginx"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) }) diff --git a/test/e2e/restart_test.go b/test/e2e/restart_test.go index d2fc35485..eca2bbcda 100644 --- a/test/e2e/restart_test.go +++ b/test/e2e/restart_test.go @@ -136,4 +136,44 @@ var _ = Describe("Podman restart", func() { Expect(timeSince < 10*time.Second).To(BeTrue()) Expect(timeSince > 2*time.Second).To(BeTrue()) }) + + It("Podman restart --all", func() { + _, exitCode, _ := podmanTest.RunLsContainer("test1") + Expect(exitCode).To(Equal(0)) + + test2 := podmanTest.RunTopContainer("test2") + test2.WaitWithDefaultTimeout() + Expect(test2.ExitCode()).To(Equal(0)) + + startTime := podmanTest.Podman([]string{"inspect", "--format='{{.State.StartedAt}}'", "test1", "test2"}) + startTime.WaitWithDefaultTimeout() + + session := podmanTest.Podman([]string{"restart", "-all"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + restartTime := podmanTest.Podman([]string{"inspect", "--format='{{.State.StartedAt}}'", "test1", "test2"}) + restartTime.WaitWithDefaultTimeout() + Expect(restartTime.OutputToStringArray()[0]).To(Not(Equal(startTime.OutputToStringArray()[0]))) + Expect(restartTime.OutputToStringArray()[1]).To(Not(Equal(startTime.OutputToStringArray()[1]))) + }) + + It("Podman restart --all --running", func() { + _, exitCode, _ := podmanTest.RunLsContainer("test1") + Expect(exitCode).To(Equal(0)) + + test2 := podmanTest.RunTopContainer("test2") + test2.WaitWithDefaultTimeout() + Expect(test2.ExitCode()).To(Equal(0)) + + startTime := podmanTest.Podman([]string{"inspect", "--format='{{.State.StartedAt}}'", "test1", "test2"}) + startTime.WaitWithDefaultTimeout() + + session := podmanTest.Podman([]string{"restart", "-a", "--running"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + restartTime := podmanTest.Podman([]string{"inspect", "--format='{{.State.StartedAt}}'", "test1", "test2"}) + restartTime.WaitWithDefaultTimeout() + Expect(restartTime.OutputToStringArray()[0]).To(Equal(startTime.OutputToStringArray()[0])) + Expect(restartTime.OutputToStringArray()[1]).To(Not(Equal(startTime.OutputToStringArray()[1]))) + }) }) diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index d362c1646..98bf66a67 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -52,13 +52,13 @@ var _ = Describe("Podman run", func() { It("podman run a container based on on a short name with localhost", func() { podmanTest.RestoreArtifact(nginx) - tag := podmanTest.Podman([]string{"tag", nginx, "localhost/baude/alpine_nginx:latest"}) + tag := podmanTest.Podman([]string{"tag", nginx, "localhost/libpod/alpine_nginx:latest"}) tag.WaitWithDefaultTimeout() rmi := podmanTest.Podman([]string{"rmi", nginx}) rmi.WaitWithDefaultTimeout() - session := podmanTest.Podman([]string{"run", "baude/alpine_nginx:latest", "ls"}) + session := podmanTest.Podman([]string{"run", "libpod/alpine_nginx:latest", "ls"}) session.WaitWithDefaultTimeout() Expect(session.ErrorToString()).ToNot(ContainSubstring("Trying to pull")) Expect(session.ExitCode()).To(Equal(0)) |