From 690c02f602eae68335192a202ba01c8097abf111 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 8 Feb 2021 14:34:01 -0500 Subject: Add missing params for podman-remote build Fixes: https://github.com/containers/podman/issues/9290 Currently we still have hard coded --isolation=chroot for podman-remote build. Implement missing arguments for podman build Implements --jobs, --disable-compression, --excludes Fixes: MaxPullPushRetries RetryDuration Signed-off-by: Daniel J Walsh --- test/e2e/build_test.go | 27 +++++++++++++++++++++++++-- test/e2e/prune_test.go | 1 - test/system/070-build.bats | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go index 9bab4c926..bdd35db8f 100644 --- a/test/e2e/build_test.go +++ b/test/e2e/build_test.go @@ -489,7 +489,7 @@ RUN grep CapEff /proc/self/status` To(ContainElement("0000000000000400")) }) - It("podman build --arch", func() { + It("podman build --isolation && --arch", func() { targetPath, err := CreateTempDirInTempDir() Expect(err).To(BeNil()) @@ -502,11 +502,34 @@ RUN grep CapEff /proc/self/status` // When session := podmanTest.Podman([]string{ - "build", "--arch", "arm64", targetPath, + "build", "--isolation", "oci", "--arch", "arm64", targetPath, }) session.WaitWithDefaultTimeout() + // Then + Expect(session.ExitCode()).To(Equal(0)) + // When + session = podmanTest.Podman([]string{ + "build", "--isolation", "chroot", "--arch", "arm64", targetPath, + }) + session.WaitWithDefaultTimeout() // Then Expect(session.ExitCode()).To(Equal(0)) + + // When + session = podmanTest.Podman([]string{ + "build", "--isolation", "rootless", "--arch", "arm64", targetPath, + }) + session.WaitWithDefaultTimeout() + // Then + Expect(session.ExitCode()).To(Equal(0)) + + // When + session = podmanTest.Podman([]string{ + "build", "--isolation", "bogus", "--arch", "arm64", targetPath, + }) + session.WaitWithDefaultTimeout() + // Then + Expect(session.ExitCode()).To(Equal(125)) }) }) diff --git a/test/e2e/prune_test.go b/test/e2e/prune_test.go index f84312103..f19627170 100644 --- a/test/e2e/prune_test.go +++ b/test/e2e/prune_test.go @@ -111,7 +111,6 @@ var _ = Describe("Podman prune", func() { It("podman image prune dangling images", func() { podmanTest.BuildImage(pruneImage, "alpine_bash:latest", "true") podmanTest.BuildImage(pruneImage, "alpine_bash:latest", "true") - none := podmanTest.Podman([]string{"images", "-a"}) none.WaitWithDefaultTimeout() Expect(none.ExitCode()).To(Equal(0)) diff --git a/test/system/070-build.bats b/test/system/070-build.bats index 7a42a4c18..3ae95b5f5 100644 --- a/test/system/070-build.bats +++ b/test/system/070-build.bats @@ -453,6 +453,45 @@ EOF run_podman rmi -a --force } +@test "build with copy-from referencing the base image" { + skip_if_rootless "cannot mount as rootless" + target=busybox-derived + target_mt=busybox-mt-derived + tmpdir=$PODMAN_TMPDIR/build-test + mkdir -p $tmpdir + containerfile1=$tmpdir/Containerfile1 + cat >$containerfile1 <$containerfile2 <