diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-04-04 01:26:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-04 01:26:22 +0200 |
commit | 307014170f6d2d39e5979edef72d1863833e4f5c (patch) | |
tree | fc60ac9ea3cdc5c03dd2f08de453d2a3d9bcfa44 /test | |
parent | 1db9053add6501f2c234a6f63bb1e74b5eb89cb0 (diff) | |
parent | 052732857aa163f5f9d1dd65f9936f2787a953c6 (diff) | |
download | podman-307014170f6d2d39e5979edef72d1863833e4f5c.tar.gz podman-307014170f6d2d39e5979edef72d1863833e4f5c.tar.bz2 podman-307014170f6d2d39e5979edef72d1863833e4f5c.zip |
Merge pull request #9884 from rhatdan/build
Fix missing podman-remote build options
Diffstat (limited to 'test')
-rw-r--r-- | test/system/070-build.bats | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/system/070-build.bats b/test/system/070-build.bats index e5b68a0d8..2e97c93e0 100644 --- a/test/system/070-build.bats +++ b/test/system/070-build.bats @@ -712,6 +712,46 @@ EOF run_podman rmi -f build_test } +@test "podman build check_label" { + skip_if_no_selinux + tmpdir=$PODMAN_TMPDIR/build-test + mkdir -p $tmpdir + tmpbuilddir=$tmpdir/build + mkdir -p $tmpbuilddir + dockerfile=$tmpbuilddir/Dockerfile + cat >$dockerfile <<EOF +FROM $IMAGE +RUN cat /proc/self/attr/current +EOF + + run_podman build -t build_test --security-opt label=level:s0:c3,c4 --format=docker $tmpbuilddir + is "$output" ".*s0:c3,c4STEP 3: COMMIT" "label setting level" + + run_podman rmi -f build_test +} + +@test "podman build check_seccomp_ulimits" { + tmpdir=$PODMAN_TMPDIR/build-test + mkdir -p $tmpdir + tmpbuilddir=$tmpdir/build + mkdir -p $tmpbuilddir + dockerfile=$tmpbuilddir/Dockerfile + cat >$dockerfile <<EOF +FROM $IMAGE +RUN grep Seccomp: /proc/self/status |awk '{ print \$1\$2 }' +RUN grep "Max open files" /proc/self/limits |awk '{ print \$4":"\$5 }' +EOF + + run_podman build --ulimit nofile=101:102 -t build_test $tmpbuilddir + is "$output" ".*Seccomp:2" "setting seccomp" + is "$output" ".*101:102" "setting ulimits" + run_podman rmi -f build_test + + run_podman build -t build_test --security-opt seccomp=unconfined $tmpbuilddir + is "$output" ".*Seccomp:0" "setting seccomp" + run_podman rmi -f build_test +} + function teardown() { # A timeout or other error in 'build' can leave behind stale images # that podman can't even see and which will cascade into subsequent |