summaryrefslogtreecommitdiff
path: root/test/e2e/build_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/build_test.go')
-rw-r--r--test/e2e/build_test.go21
1 files changed, 7 insertions, 14 deletions
diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go
index aca2b831b..420ed929f 100644
--- a/test/e2e/build_test.go
+++ b/test/e2e/build_test.go
@@ -230,8 +230,7 @@ RUN printenv http_proxy`, ALPINE)
session := podmanTest.Podman([]string{"build", "--pull-never", "--http-proxy", "--file", dockerfilePath, podmanTest.TempDir})
session.Wait(120)
Expect(session).Should(Exit(0))
- ok, _ := session.GrepString("1.2.3.4")
- Expect(ok).To(BeTrue())
+ Expect(session.OutputToString()).To(ContainSubstring("1.2.3.4"))
os.Unsetenv("http_proxy")
})
@@ -284,8 +283,7 @@ RUN find /test`, ALPINE)
session := podmanTest.Podman([]string{"build", "--pull-never", "-t", "test", "-f", "Containerfile", targetSubPath})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- ok, _ := session.GrepString("/test/dummy")
- Expect(ok).To(BeTrue())
+ Expect(session.OutputToString()).To(ContainSubstring("/test/dummy"))
})
It("podman remote test container/docker file is not at root of context dir", func() {
@@ -392,8 +390,7 @@ subdir**`
Expect(session).Should(Exit(0))
ok, _ := session.GrepString("/testfilter/dummy1")
Expect(ok).NotTo(BeTrue())
- ok, _ = session.GrepString("/testfilter/dummy2")
- Expect(ok).To(BeTrue())
+ Expect(session.OutputToString()).To(ContainSubstring("/testfilter/dummy2"))
ok, _ = session.GrepString("/testfilter/subdir")
Expect(ok).NotTo(BeTrue()) //.dockerignore filters both subdir and inside subdir
ok, _ = session.GrepString("/testfilter/subdir/dummy3")
@@ -450,14 +447,10 @@ RUN [[ -L /test/dummy-symlink ]] && echo SYMLNKOK || echo SYMLNKERR`, ALPINE)
session := podmanTest.Podman([]string{"build", "--pull-never", "-t", "test", targetSubPath})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- ok, _ := session.GrepString("/test/dummy")
- Expect(ok).To(BeTrue())
- ok, _ = session.GrepString("/test/emptyDir")
- Expect(ok).To(BeTrue())
- ok, _ = session.GrepString("/test/dummy-symlink")
- Expect(ok).To(BeTrue())
- ok, _ = session.GrepString("SYMLNKOK")
- Expect(ok).To(BeTrue())
+ Expect(session.OutputToString()).To(ContainSubstring("/test/dummy"))
+ Expect(session.OutputToString()).To(ContainSubstring("/test/emptyDir"))
+ Expect(session.OutputToString()).To(ContainSubstring("/test/dummy-symlink"))
+ Expect(session.OutputToString()).To(ContainSubstring("SYMLNKOK"))
})
It("podman build --from, --add-host, --cap-drop, --cap-add", func() {