summaryrefslogtreecommitdiff
path: root/test/e2e/build_test.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-03-03 05:08:13 -0500
committerGitHub <noreply@github.com>2021-03-03 05:08:13 -0500
commitaed632cb8ca4be2a57e8159041ef31829b3d2b2c (patch)
tree3b2727896ad022b7232244aea77e845f9f65a589 /test/e2e/build_test.go
parent2a3460b26dc7056189abbbfd19c1f37367fa6b6c (diff)
parent5df6251402af9cc38172edb7802374fcf787d920 (diff)
downloadpodman-aed632cb8ca4be2a57e8159041ef31829b3d2b2c.tar.gz
podman-aed632cb8ca4be2a57e8159041ef31829b3d2b2c.tar.bz2
podman-aed632cb8ca4be2a57e8159041ef31829b3d2b2c.zip
Merge pull request #9580 from rhatdan/timestamp
Fix support for podman build --timestamp
Diffstat (limited to 'test/e2e/build_test.go')
-rw-r--r--test/e2e/build_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go
index c733db61c..4839d66ec 100644
--- a/test/e2e/build_test.go
+++ b/test/e2e/build_test.go
@@ -532,4 +532,20 @@ RUN grep CapEff /proc/self/status`
// Then
Expect(session.ExitCode()).To(Equal(125))
})
+
+ It("podman build --timestamp flag", func() {
+ containerfile := `FROM quay.io/libpod/alpine:latest
+RUN echo hello`
+
+ containerfilePath := filepath.Join(podmanTest.TempDir, "Containerfile")
+ err := ioutil.WriteFile(containerfilePath, []byte(containerfile), 0755)
+ Expect(err).To(BeNil())
+ session := podmanTest.Podman([]string{"build", "-t", "test", "--timestamp", "0", "--file", containerfilePath, podmanTest.TempDir})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ inspect := podmanTest.Podman([]string{"image", "inspect", "--format", "{{ .Created }}", "test"})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect.OutputToString()).To(Equal("1970-01-01 00:00:00 +0000 UTC"))
+ })
})