aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-01-03 15:08:15 +0100
committerGitHub <noreply@github.com>2022-01-03 15:08:15 +0100
commit99a5754d6dbfa2479d092d2ee0770a6bcfb47b13 (patch)
treed3e149da669423ce263c69c330bc3e80178758f4
parent481839af2fabdd78619c595d6bb108eb2facc758 (diff)
parent2ff5644bf8d0fec91d74a541d680bf91c7008bd1 (diff)
downloadpodman-99a5754d6dbfa2479d092d2ee0770a6bcfb47b13.tar.gz
podman-99a5754d6dbfa2479d092d2ee0770a6bcfb47b13.tar.bz2
podman-99a5754d6dbfa2479d092d2ee0770a6bcfb47b13.zip
Merge pull request #12725 from rhatdan/test
test/system: podman run with log-opt option
-rw-r--r--test/system/030-run.bats19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index 130cf5492..d81a0758c 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -778,6 +778,25 @@ EOF
is "$output" "1.2.3.4 foo.com.*" "users can add hosts even without /etc/hosts"
}
+# rhbz#1854566 : $IMAGE has incorrect permission 555 on the root '/' filesystem
+@test "podman run image with filesystem permission" {
+ # make sure the IMAGE image have permissiong of 555 like filesystem RPM expects
+ run_podman run --rm $IMAGE stat -c %a /
+ is "$output" "555" "directory permissions on /"
+}
+
+# rhbz#1763007 : the --log-opt for podman run does not work as expected
+@test "podman run with log-opt option" {
+ # Pseudorandom size of the form N.NNN. The '| 1' handles '0.NNN' or 'N.NN0',
+ # which podman displays as 'NNN kB' or 'N.NN MB' respectively.
+ size=$(printf "%d.%03d" $(($RANDOM % 10 | 1)) $(($RANDOM % 100 | 1)))
+ run_podman run -d --rm --log-opt max-size=${size}m $IMAGE sleep 5
+ cid=$output
+ run_podman inspect --format "{{ .HostConfig.LogConfig.Size }}" $cid
+ is "$output" "${size}MB"
+ run_podman rm -t 0 -f $cid
+}
+
@test "podman run --kernel-memory warning" {
# Not sure what situations this fails in, but want to make sure warning shows.
run_podman '?' run --rm --kernel-memory 100 $IMAGE false