summaryrefslogtreecommitdiff
path: root/test/e2e/pod_create_test.go
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2021-11-23 06:32:36 -0700
committerEd Santiago <santiago@redhat.com>2021-11-23 13:50:35 -0700
commitcd59721de13e388bac706576057dc42c0853484d (patch)
treef19930072101cd1cb15d6aab7e071bf9ad54181a /test/e2e/pod_create_test.go
parent1be4c36e7ecbe05333e13320ea1e194b0c41b539 (diff)
downloadpodman-cd59721de13e388bac706576057dc42c0853484d.tar.gz
podman-cd59721de13e388bac706576057dc42c0853484d.tar.bz2
podman-cd59721de13e388bac706576057dc42c0853484d.zip
e2e test cleanup, continued
Continue eliminating GrepString() and BeTrue(), in tiny incremental steps. Here I take the liberty of refactoring some hard-to-read code by adding a helper. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/e2e/pod_create_test.go')
-rw-r--r--test/e2e/pod_create_test.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index 820b13a17..a3dde3650 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -756,7 +756,7 @@ ENTRYPOINT ["sleep","99999"]
session := podmanTest.Podman([]string{"run", "--pod", podName, ALPINE, "cat", "/proc/self/uid_map"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- ok, _ := session.GrepString("500")
+ Expect(session.OutputToString()).To(ContainSubstring("500"))
podName = "testPod-1"
podCreate = podmanTest.Podman([]string{"pod", "create", "--userns=auto:size=3000", "--name", podName})
@@ -765,9 +765,7 @@ ENTRYPOINT ["sleep","99999"]
session = podmanTest.Podman([]string{"run", "--pod", podName, ALPINE, "cat", "/proc/self/uid_map"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- ok, _ = session.GrepString("3000")
-
- Expect(ok).To(BeTrue())
+ Expect(session.OutputToString()).To(ContainSubstring("3000"))
})
It("podman pod create --userns=auto:uidmapping=", func() {