summaryrefslogtreecommitdiff
path: root/test/e2e/run_volume_test.go
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2021-11-30 13:14:56 -0700
committerEd Santiago <santiago@redhat.com>2021-11-30 15:19:57 -0700
commit9ce7ade8c8dedb6a082614e45aa10d0e37c725cc (patch)
treeaeefee1ec3a9bac7ee92c7d8d88f3d85c1364cef /test/e2e/run_volume_test.go
parent295a6f7dd086731448a1168a349f62d3035258ca (diff)
downloadpodman-9ce7ade8c8dedb6a082614e45aa10d0e37c725cc.tar.gz
podman-9ce7ade8c8dedb6a082614e45aa10d0e37c725cc.tar.bz2
podman-9ce7ade8c8dedb6a082614e45aa10d0e37c725cc.zip
e2e: yet more cleanup of BeTrue/BeFalse
Thanks to Paul for teaching me about HaveKey() Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/e2e/run_volume_test.go')
-rw-r--r--test/e2e/run_volume_test.go24
1 files changed, 10 insertions, 14 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go
index 10c191bd9..74aa69c96 100644
--- a/test/e2e/run_volume_test.go
+++ b/test/e2e/run_volume_test.go
@@ -103,10 +103,8 @@ var _ = Describe("Podman run with volumes", func() {
session = podmanTest.Podman([]string{"run", "--rm", "--mount", mount + ",consistency=delegated,shared", ALPINE, "grep", dest, "/proc/self/mountinfo"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- found, matches := session.GrepString(dest)
- Expect(found).Should(BeTrue())
- Expect(matches[0]).To(ContainSubstring("rw"))
- Expect(matches[0]).To(ContainSubstring("shared"))
+ Expect(session.OutputToString()).To(ContainSubstring("rw"))
+ Expect(session.OutputToString()).To(ContainSubstring("shared"))
session = podmanTest.Podman([]string{"run", "--rm", "--mount", "type=tmpfs,target=" + dest, ALPINE, "grep", dest, "/proc/self/mountinfo"})
session.WaitWithDefaultTimeout()
@@ -195,20 +193,18 @@ var _ = Describe("Podman run with volumes", func() {
session := podmanTest.Podman([]string{"run", "--rm", "-v", mountPath + ":" + dest + ":suid,dev,exec", ALPINE, "grep", dest, "/proc/self/mountinfo"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- found, matches := session.GrepString(dest)
- Expect(found).Should(BeTrue())
- Expect(matches[0]).To(Not(ContainSubstring("noexec")))
- Expect(matches[0]).To(Not(ContainSubstring("nodev")))
- Expect(matches[0]).To(Not(ContainSubstring("nosuid")))
+ output := session.OutputToString()
+ Expect(output).To(Not(ContainSubstring("noexec")))
+ Expect(output).To(Not(ContainSubstring("nodev")))
+ Expect(output).To(Not(ContainSubstring("nosuid")))
session = podmanTest.Podman([]string{"run", "--rm", "--tmpfs", dest + ":suid,dev,exec", ALPINE, "grep", dest, "/proc/self/mountinfo"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- found, matches = session.GrepString(dest)
- Expect(found).Should(BeTrue())
- Expect(matches[0]).To(Not(ContainSubstring("noexec")))
- Expect(matches[0]).To(Not(ContainSubstring("nodev")))
- Expect(matches[0]).To(Not(ContainSubstring("nosuid")))
+ output = session.OutputToString()
+ Expect(output).To(Not(ContainSubstring("noexec")))
+ Expect(output).To(Not(ContainSubstring("nodev")))
+ Expect(output).To(Not(ContainSubstring("nosuid")))
})
// Container should start when workdir is overlay volume