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.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go
index 8b03e9386..9e41fd231 100644
--- a/test/e2e/build_test.go
+++ b/test/e2e/build_test.go
@@ -175,4 +175,24 @@ var _ = Describe("Podman build", func() {
data := inspect.InspectImageJSON()
Expect(data[0].ID).To(Equal(string(id)))
})
+
+ It("podman Test PATH in built image", func() {
+ path := "/tmp:/bin:/usr/bin:/usr/sbin"
+ session := podmanTest.PodmanNoCache([]string{
+ "build", "-f", "build/basicalpine/Containerfile.path", "-t", "test-path",
+ })
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"run", "test-path", "printenv", "PATH"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ stdoutLines := session.OutputToStringArray()
+ Expect(stdoutLines[0]).Should(Equal(path))
+
+ session = podmanTest.PodmanNoCache([]string{"rmi", "-a", "-f"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
})