summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-09 10:21:50 -0400
committerGitHub <noreply@github.com>2020-09-09 10:21:50 -0400
commit5a09fd8f2b8e624a8d4155fd4fc89f51e544e2ca (patch)
tree8b4a635785941a0ff9422f26882db3bae67daca8 /test
parent81bc0395ad67bcaa436bc9067a64efc5dcc02683 (diff)
parent28e685f26efb2b4f18f29e21c2e6a1844dc04174 (diff)
downloadpodman-5a09fd8f2b8e624a8d4155fd4fc89f51e544e2ca.tar.gz
podman-5a09fd8f2b8e624a8d4155fd4fc89f51e544e2ca.tar.bz2
podman-5a09fd8f2b8e624a8d4155fd4fc89f51e544e2ca.zip
Merge pull request #7570 from rhatdan/logfile
Fix podman build --logfile
Diffstat (limited to 'test')
-rw-r--r--test/e2e/build_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go
index 9fd82e149..0b6e919d0 100644
--- a/test/e2e/build_test.go
+++ b/test/e2e/build_test.go
@@ -57,6 +57,29 @@ var _ = Describe("Podman build", func() {
Expect(session.ExitCode()).To(Equal(0))
})
+ It("podman build with logfile", func() {
+ SkipIfRemote()
+ logfile := filepath.Join(podmanTest.TempDir, "logfile")
+ session := podmanTest.PodmanNoCache([]string{"build", "--tag", "test", "--logfile", logfile, "build/basicalpine"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ // Verify that OS and Arch are being set
+ inspect := podmanTest.PodmanNoCache([]string{"inspect", "test"})
+ inspect.WaitWithDefaultTimeout()
+ data := inspect.InspectImageJSON()
+ Expect(data[0].Os).To(Equal(runtime.GOOS))
+ Expect(data[0].Architecture).To(Equal(runtime.GOARCH))
+
+ st, err := os.Stat(logfile)
+ Expect(err).To(BeNil())
+ Expect(st.Size()).To(Not(Equal(0)))
+
+ session = podmanTest.PodmanNoCache([]string{"rmi", "alpine"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
// If the context directory is pointing at a file and not a directory,
// that's a no no, fail out.
It("podman build context directory a file", func() {