diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-03-02 14:25:29 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-03-02 14:25:29 -0500 |
commit | 5df6251402af9cc38172edb7802374fcf787d920 (patch) | |
tree | 779860725a73f4fbe19a48aadb96070be3b40114 /test/e2e/build_test.go | |
parent | 426178a49991106ffe222f12cc42409ae78dd257 (diff) | |
download | podman-5df6251402af9cc38172edb7802374fcf787d920.tar.gz podman-5df6251402af9cc38172edb7802374fcf787d920.tar.bz2 podman-5df6251402af9cc38172edb7802374fcf787d920.zip |
Fix support for podman build --timestamp
Currently podman is ignoreing the build --timestamp flag.
This PR fixes this for local and remote clients.
Fixes: https://github.com/containers/podman/issues/9569
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/e2e/build_test.go')
-rw-r--r-- | test/e2e/build_test.go | 16 |
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")) + }) }) |