diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-28 16:10:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-28 16:10:33 -0400 |
commit | 464aa36b0cc5cf2066380184eb1bb014107a1ca9 (patch) | |
tree | f3619b3dee9fed8f558b79e7f8ac49bbfc1158f5 /test | |
parent | e04e567b96cafae30863c7782f7bc10c55bfb681 (diff) | |
parent | cddfe3983be63ee5193a19fb6669600f059a839f (diff) | |
download | podman-464aa36b0cc5cf2066380184eb1bb014107a1ca9.tar.gz podman-464aa36b0cc5cf2066380184eb1bb014107a1ca9.tar.bz2 podman-464aa36b0cc5cf2066380184eb1bb014107a1ca9.zip |
Merge pull request #8081 from mheon/pod_degraded
Add a Degraded state to pods
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/pod_create_test.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go index 83a66d2b9..95870788e 100644 --- a/test/e2e/pod_create_test.go +++ b/test/e2e/pod_create_test.go @@ -446,4 +446,34 @@ entrypoint ["/fromimage"] Expect(check.ExitCode()).To(Equal(0)) Expect(check.OutputToString()).To(Equal("[port_handler=slirp4netns]")) }) + + It("podman pod status test", func() { + podName := "testpod" + create := podmanTest.Podman([]string{"pod", "create", "--name", podName}) + create.WaitWithDefaultTimeout() + Expect(create.ExitCode()).To(Equal(0)) + + status1 := podmanTest.Podman([]string{"pod", "inspect", "--format", "{{ .State }}", podName}) + status1.WaitWithDefaultTimeout() + Expect(status1.ExitCode()).To(Equal(0)) + Expect(strings.Contains(status1.OutputToString(), "Created")).To(BeTrue()) + + ctr1 := podmanTest.Podman([]string{"run", "--pod", podName, "-d", ALPINE, "top"}) + ctr1.WaitWithDefaultTimeout() + Expect(ctr1.ExitCode()).To(Equal(0)) + + status2 := podmanTest.Podman([]string{"pod", "inspect", "--format", "{{ .State }}", podName}) + status2.WaitWithDefaultTimeout() + Expect(status2.ExitCode()).To(Equal(0)) + Expect(strings.Contains(status2.OutputToString(), "Running")).To(BeTrue()) + + ctr2 := podmanTest.Podman([]string{"create", "--pod", podName, ALPINE, "top"}) + ctr2.WaitWithDefaultTimeout() + Expect(ctr2.ExitCode()).To(Equal(0)) + + status3 := podmanTest.Podman([]string{"pod", "inspect", "--format", "{{ .State }}", podName}) + status3.WaitWithDefaultTimeout() + Expect(status3.ExitCode()).To(Equal(0)) + Expect(strings.Contains(status3.OutputToString(), "Degraded")).To(BeTrue()) + }) }) |