summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/buildah-bud/apply-podman-deltas16
-rw-r--r--test/e2e/build_test.go26
2 files changed, 42 insertions, 0 deletions
diff --git a/test/buildah-bud/apply-podman-deltas b/test/buildah-bud/apply-podman-deltas
index 1ca171c4a..e2ca45728 100755
--- a/test/buildah-bud/apply-podman-deltas
+++ b/test/buildah-bud/apply-podman-deltas
@@ -193,6 +193,22 @@ skip_if_remote "volumes don't work with podman-remote" \
"buildah bud --volume" \
"buildah-bud-policy"
+# Most of this should work in podman remote after API implementation other than where context is host.
+skip_if_remote "--build-context option not implemented in podman-remote" \
+ "build-with-additional-build-context and COPY, test pinning image" \
+ "build-with-additional-build-context and COPY, stagename and additional-context conflict" \
+ "build-with-additional-build-context and COPY, additionalContext and numeric value of stage" \
+ "build-with-additional-build-context and COPY, additionalContext and numeric value of stage" \
+ "build-with-additional-build-context and COPY, additional context from host" \
+ "build-with-additional-build-context and COPY, additional context from external URL" \
+ "build-with-additional-build-context and RUN --mount=from=, additional-context is URL and mounted from subdir" \
+ "build-with-additional-build-context and RUN --mount=from=, additional-context not image and also test conflict with stagename" \
+ "build-with-additional-build-context and RUN --mount=from=, additional-context and also test conflict with stagename" \
+ "bud-multiple-platform for --all-platform with additional-build-context" \
+ "build-with-additional-build-context and FROM, stagename and additional-context conflict" \
+ "bud with Containerfile.in, via envariable" \
+ "build-with-additional-build-context and FROM, pin busybox to alpine"
+
# Requires a local file outside context dir
skip_if_remote "local keyfile not sent to podman-remote" \
"bud with encrypted FROM image"
diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go
index dcdd17143..86dc76116 100644
--- a/test/e2e/build_test.go
+++ b/test/e2e/build_test.go
@@ -178,6 +178,32 @@ var _ = Describe("Podman build", func() {
Expect(session).Should(Exit(0))
})
+ It("podman build verify explicit cache use with squash-all and --layers", func() {
+ session := podmanTest.Podman([]string{"build", "--pull-never", "-f", "build/squash/Dockerfile.squash-c", "--squash-all", "--layers", "-t", "test-squash-d:latest", "build/squash"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ session = podmanTest.Podman([]string{"inspect", "--format", "{{.RootFS.Layers}}", "test-squash-d"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ // Check for one layers
+ Expect(strings.Fields(session.OutputToString())).To(HaveLen(1))
+
+ // Second build must use last squashed build from cache
+ session = podmanTest.Podman([]string{"build", "--pull-never", "-f", "build/squash/Dockerfile.squash-c", "--squash-all", "--layers", "-t", "test", "build/squash"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ // Test if entire build is used from cache
+ Expect(session.OutputToString()).To(ContainSubstring("Using cache"))
+
+ session = podmanTest.Podman([]string{"inspect", "--format", "{{.RootFS.Layers}}", "test-squash-d"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ // Check for one layers
+ Expect(strings.Fields(session.OutputToString())).To(HaveLen(1))
+
+ })
+
It("podman build Containerfile locations", func() {
// Given
// Switch to temp dir and restore it afterwards