diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-09-27 20:09:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-27 20:09:17 +0200 |
commit | d4399eebb9f3ce91f8869902bf4b806bf2e56b35 (patch) | |
tree | cec20dfc07663e59053dbffc3eaeebf38e450631 /test/e2e | |
parent | a8c2b5dee4b746c2e83970603ff2645008d54b95 (diff) | |
parent | f4723beac6e19d23756ee5a1423fb4eac6819400 (diff) | |
download | podman-d4399eebb9f3ce91f8869902bf4b806bf2e56b35.tar.gz podman-d4399eebb9f3ce91f8869902bf4b806bf2e56b35.tar.bz2 podman-d4399eebb9f3ce91f8869902bf4b806bf2e56b35.zip |
Merge pull request #4121 from jwhonce/issue/4021
Change ginkgo Wait() to Eventually() test
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/start_test.go | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/test/e2e/start_test.go b/test/e2e/start_test.go index fc1203ed1..06ab6aacd 100644 --- a/test/e2e/start_test.go +++ b/test/e2e/start_test.go @@ -6,6 +6,7 @@ import ( . "github.com/containers/libpod/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + . "github.com/onsi/gomega/gexec" ) var _ = Describe("Podman start", func() { @@ -107,32 +108,30 @@ var _ = Describe("Podman start", func() { start := podmanTest.Podman([]string{"start", "-l"}) start.WaitWithDefaultTimeout() - Expect(start.ExitCode()).To(Not(Equal(0))) + Expect(start.ExitCode()).Should(BeNumerically(">", 0)) - numContainers := podmanTest.NumberOfContainers() - Expect(numContainers).To(BeZero()) + Eventually(podmanTest.NumberOfContainers(), defaultWaitTimeout).Should(BeZero()) }) It("podman failed to start without --rm should NOT delete the container", func() { session := podmanTest.Podman([]string{"create", "-it", ALPINE, "foo"}) session.WaitWithDefaultTimeout() - Expect(session.ExitCode()).To(Equal(0)) + Expect(session).Should(Exit(0)) start := podmanTest.Podman([]string{"start", "-l"}) start.WaitWithDefaultTimeout() - Expect(start.ExitCode()).To(Not(Equal(0))) + Expect(start.ExitCode()).Should(BeNumerically(">", 0)) - numContainers := podmanTest.NumberOfContainers() - Expect(numContainers).To(Equal(1)) + Eventually(podmanTest.NumberOfContainers(), defaultWaitTimeout).Should(Equal(1)) }) It("podman start --sig-proxy should not work without --attach", func() { session := podmanTest.Podman([]string{"create", ALPINE, "ls"}) session.WaitWithDefaultTimeout() - Expect(session.ExitCode()).To(Equal(0)) + Expect(session).Should(Exit(0)) session = podmanTest.Podman([]string{"start", "-l", "--sig-proxy"}) session.WaitWithDefaultTimeout() - Expect(session.ExitCode()).To(Equal(125)) + Expect(session).Should(Exit(125)) }) }) |