summaryrefslogtreecommitdiff
path: root/test/system/070-build.bats
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2020-11-19 09:57:06 -0700
committerEd Santiago <santiago@redhat.com>2020-12-01 08:14:54 -0700
commita17fb01d400f8f3504099fbd65e284124432f274 (patch)
tree26619409c5f94c0f93cca9e54eaf833bb7dd1b5b /test/system/070-build.bats
parent24383906f891cea0c802f911deed43f8f8f2ac85 (diff)
downloadpodman-a17fb01d400f8f3504099fbd65e284124432f274.tar.gz
podman-a17fb01d400f8f3504099fbd65e284124432f274.tar.bz2
podman-a17fb01d400f8f3504099fbd65e284124432f274.zip
BATS: add ping test
- run test : tweaks to recently-added network-conflict test: * remove "-d" in run * confirm exact warning text, and also that container runs successfully * test multiple --net options (regression #8057) - images, run, build, exec tests: add multiple-flag testing for various flags, confirming as appropriate whether options are overridden or accumulated. - ps test : add --filter and --sort tests - pod test: run 'ping' inside container (confirms that container gets PING capability) Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/070-build.bats')
-rw-r--r--test/system/070-build.bats17
1 files changed, 12 insertions, 5 deletions
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index 83bcd13eb..59da503a6 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -135,10 +135,13 @@ echo "\$1"
printenv | grep MYENV | sort | sed -e 's/^MYENV.=//'
EOF
- # For overriding with --env-file
- cat >$PODMAN_TMPDIR/env-file <<EOF
+ # For overriding with --env-file; using multiple files confirms that
+ # the --env-file option is cumulative, not last-one-wins.
+ cat >$PODMAN_TMPDIR/env-file1 <<EOF
MYENV3=$s_env3
http_proxy=http-proxy-in-env-file
+EOF
+ cat >$PODMAN_TMPDIR/env-file2 <<EOF
https_proxy=https-proxy-in-env-file
EOF
@@ -185,7 +188,8 @@ EOF
export MYENV2="$s_env2"
export MYENV3="env-file-should-override-env-host!"
run_podman run --rm \
- --env-file=$PODMAN_TMPDIR/env-file \
+ --env-file=$PODMAN_TMPDIR/env-file1 \
+ --env-file=$PODMAN_TMPDIR/env-file2 \
${ENVHOST} \
-e MYENV4="$s_env4" \
build_test
@@ -205,7 +209,9 @@ EOF
# Proxies - environment should override container, but not env-file
http_proxy=http-proxy-from-env ftp_proxy=ftp-proxy-from-env \
- run_podman run --rm --env-file=$PODMAN_TMPDIR/env-file \
+ run_podman run --rm \
+ --env-file=$PODMAN_TMPDIR/env-file1 \
+ --env-file=$PODMAN_TMPDIR/env-file2 \
build_test \
printenv http_proxy https_proxy ftp_proxy
is "${lines[0]}" "http-proxy-in-env-file" "env-file overrides env"
@@ -222,7 +228,8 @@ EOF
is "$output" "$workdir" "pwd command in container"
# Determine buildah version, so we can confirm it gets into Labels
- run_podman info --format '{{ .Host.BuildahVersion }}'
+ # Multiple --format options confirm command-line override (last one wins)
+ run_podman info --format '{{.Ignore}}' --format '{{ .Host.BuildahVersion }}'
is "$output" "[1-9][0-9.-]\+" ".Host.BuildahVersion is reasonable"
buildah_version=$output