summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authortomsweeneyredhat <tsweeney@redhat.com>2022-01-26 20:39:58 -0500
committertomsweeneyredhat <tsweeney@redhat.com>2022-01-27 07:03:56 -0500
commit4a4d86d40f9137144103147e7a0ba74fbf3aaca8 (patch)
tree3ac1755da170942000631457d343f9ae2c34ef21 /test
parent09589fccfdd27478defc3e3e3827265d50fa9e33 (diff)
downloadpodman-4a4d86d40f9137144103147e7a0ba74fbf3aaca8.tar.gz
podman-4a4d86d40f9137144103147e7a0ba74fbf3aaca8.tar.bz2
podman-4a4d86d40f9137144103147e7a0ba74fbf3aaca8.zip
Bump Buildah to v1.24.0
Bumps Buildah to v1.24.0 and adopts the new values for pull: true, false, never, and always. The pull-never and pull-always options for the build command are still usable, but they have been removed from the man page documentation with this change. Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/build_test.go28
1 files changed, 26 insertions, 2 deletions
diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go
index 5dabe728a..a1c2f5e54 100644
--- a/test/e2e/build_test.go
+++ b/test/e2e/build_test.go
@@ -100,7 +100,7 @@ var _ = Describe("Podman build", func() {
It("podman build with logfile", func() {
logfile := filepath.Join(podmanTest.TempDir, "logfile")
- session := podmanTest.Podman([]string{"build", "--pull-never", "--tag", "test", "--logfile", logfile, "build/basicalpine"})
+ session := podmanTest.Podman([]string{"build", "--pull=never", "--tag", "test", "--logfile", logfile, "build/basicalpine"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
@@ -123,7 +123,7 @@ var _ = Describe("Podman build", func() {
// 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() {
- session := podmanTest.Podman([]string{"build", "--pull-never", "build/context_dir_a_file"})
+ session := podmanTest.Podman([]string{"build", "--pull=never", "build/context_dir_a_file"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(125))
})
@@ -308,6 +308,30 @@ RUN exit 5`, ALPINE)
Expect(data).To(ContainSubstring(buildah.Version))
})
+ It("podman build and check identity with always", func() {
+ // with --pull=always
+ session := podmanTest.Podman([]string{"build", "--pull=always", "-f", "build/basicalpine/Containerfile.path", "--no-cache", "-t", "test1", "build/basicalpine"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ // Verify that OS and Arch are being set
+ inspect := podmanTest.Podman([]string{"image", "inspect", "--format", "{{ index .Config.Labels }}", "test1"})
+ inspect.WaitWithDefaultTimeout()
+ data := inspect.OutputToString()
+ Expect(data).To(ContainSubstring(buildah.Version))
+
+ // with --pull-always
+ session = podmanTest.Podman([]string{"build", "--pull-always", "-f", "build/basicalpine/Containerfile.path", "--no-cache", "-t", "test2", "build/basicalpine"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ // Verify that OS and Arch are being set
+ inspect = podmanTest.Podman([]string{"image", "inspect", "--format", "{{ index .Config.Labels }}", "test2"})
+ inspect.WaitWithDefaultTimeout()
+ data = inspect.OutputToString()
+ Expect(data).To(ContainSubstring(buildah.Version))
+ })
+
It("podman remote test container/docker file is not inside context dir", func() {
// Given
// Switch to temp dir and restore it afterwards