summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-01-14 13:12:16 +0100
committerGitHub <noreply@github.com>2022-01-14 13:12:16 +0100
commit9686216f9d44e1d6b4fa60a5c0866746d1afa60b (patch)
tree06eedc29120dff30292b8bc1778d533de22e30ca /test
parent482e0b11d988983a777990a931a6d4125117c0f3 (diff)
parentbf3734ad53c6ad212c56730350e6265bf8278913 (diff)
downloadpodman-9686216f9d44e1d6b4fa60a5c0866746d1afa60b.tar.gz
podman-9686216f9d44e1d6b4fa60a5c0866746d1afa60b.tar.bz2
podman-9686216f9d44e1d6b4fa60a5c0866746d1afa60b.zip
Merge pull request #12853 from cdoern/buildRelative
Podman Build use absolute filepath
Diffstat (limited to 'test')
-rw-r--r--test/e2e/build_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go
index d4f0a2b04..c05dc6f3f 100644
--- a/test/e2e/build_test.go
+++ b/test/e2e/build_test.go
@@ -691,4 +691,19 @@ RUN ls /dev/test1`, ALPINE)
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
})
+
+ It("podman build use absolute path even if given relative", func() {
+ containerFile := fmt.Sprintf(`FROM %s`, ALPINE)
+ err = os.Mkdir("relative", 0755)
+ Expect(err).To(BeNil())
+ containerFilePath := filepath.Join("relative", "Containerfile")
+ fmt.Println(containerFilePath)
+ err = ioutil.WriteFile(containerFilePath, []byte(containerFile), 0755)
+ Expect(err).To(BeNil())
+ build := podmanTest.Podman([]string{"build", "-f", "./relative/Containerfile"})
+ build.WaitWithDefaultTimeout()
+ Expect(build).To(Exit(0))
+ err = os.RemoveAll("relative")
+ Expect(err).To(BeNil())
+ })
})