summaryrefslogtreecommitdiff
path: root/test/system/070-build.bats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-16 08:53:27 -0500
committerGitHub <noreply@github.com>2021-02-16 08:53:27 -0500
commit6639b218a28301e6e8d075cceb18c56ea62fcade (patch)
treeb629cf4e17fae64a112f29710999955590d6509c /test/system/070-build.bats
parent0a6b76eba173dbc4b4b4ad468e15b9d9cb192292 (diff)
parent2845f7b832ebf14d4c2f1bb8c147df5f60db4115 (diff)
downloadpodman-6639b218a28301e6e8d075cceb18c56ea62fcade.tar.gz
podman-6639b218a28301e6e8d075cceb18c56ea62fcade.tar.bz2
podman-6639b218a28301e6e8d075cceb18c56ea62fcade.zip
Merge pull request #9368 from vrothberg/fix-9365
podman build: pass runtime to buildah
Diffstat (limited to 'test/system/070-build.bats')
-rw-r--r--test/system/070-build.bats25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index 7a42a4c18..c18f3f7a7 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -46,6 +46,31 @@ EOF
is "$output" ".*invalidflag" "failed when passing undefined flags to the runtime"
}
+@test "podman build - set runtime" {
+ skip_if_remote "--runtime flag not supported for remote"
+ # Test on the CLI and via containers.conf
+
+ tmpdir=$PODMAN_TMPDIR/build-test
+ run mkdir -p $tmpdir
+ containerfile=$tmpdir/Containerfile
+ cat >$containerfile <<EOF
+FROM $IMAGE
+RUN echo $rand_content
+EOF
+
+ run_podman 125 --runtime=idonotexist build -t build_test $tmpdir
+ is "$output" ".*\"idonotexist\" not found.*" "failed when passing invalid OCI runtime via CLI"
+
+ containersconf=$tmpdir/containers.conf
+ cat >$containersconf <<EOF
+[engine]
+runtime="idonotexist"
+EOF
+
+ CONTAINERS_CONF="$containersconf" run_podman 125 build -t build_test $tmpdir
+ is "$output" ".*\"idonotexist\" not found.*" "failed when passing invalid OCI runtime via containers.conf"
+}
+
# Regression from v1.5.0. This test passes fine in v1.5.0, fails in 1.6
@test "podman build - cache (#3920)" {
# Make an empty test directory, with a subdirectory used for tar