Merge pull request #23189 from edsantiago/system-test-tweaks

System test fixes
This commit is contained in:
openshift-merge-bot[bot]
2024-07-04 13:04:36 +00:00
committed by GitHub
7 changed files with 9 additions and 1 deletions

View File

@ -1010,6 +1010,7 @@ EOF
run_podman rm $output run_podman rm $output
} }
# bats file_tags=distro-integration
@test "podman run --device-read-bps" { @test "podman run --device-read-bps" {
skip_if_rootless "cannot use this flag in rootless mode" skip_if_rootless "cannot use this flag in rootless mode"
# this test is a triple check on blkio flags since they seem to sneak by the tests # this test is a triple check on blkio flags since they seem to sneak by the tests

View File

@ -305,6 +305,7 @@ EOF
is "$output" "bar1.*bar2.*bar3" "Should match multiple source files on single destination directory" is "$output" "bar1.*bar2.*bar3" "Should match multiple source files on single destination directory"
} }
# bats test_tags=distro-integration
@test "podman mount noswap memory mounts" { @test "podman mount noswap memory mounts" {
# tmpfs+noswap new in kernel 6.x, mid-2023; likely not in RHEL for a while # tmpfs+noswap new in kernel 6.x, mid-2023; likely not in RHEL for a while
if ! is_rootless; then if ! is_rootless; then

View File

@ -299,7 +299,7 @@ LISTEN_FDNAMES=listen_fdnames" | sort)
} }
# https://github.com/containers/podman/issues/13153 # https://github.com/containers/podman/issues/13153
@test "podman rootless-netns pasta processes should be in different cgroup" { @test "podman rootless-netns processes should be in different cgroup" {
is_rootless || skip "only meaningful for rootless" is_rootless || skip "only meaningful for rootless"
cname=$(random_string) cname=$(random_string)

View File

@ -176,6 +176,7 @@ function wait_for_journal() {
die "Timed out waiting for '$expect_str' in journalctl output" die "Timed out waiting for '$expect_str' in journalctl output"
} }
# bats test_tags=distro-integration
@test "quadlet - basic" { @test "quadlet - basic" {
# Network=none is to work around a Pasta bug, can be removed once a patched Pasta is available. # Network=none is to work around a Pasta bug, can be removed once a patched Pasta is available.
# Ref https://github.com/containers/podman/pull/21563#issuecomment-1965145324 # Ref https://github.com/containers/podman/pull/21563#issuecomment-1965145324

View File

@ -117,6 +117,7 @@ device-write-iops = /dev/zero:4000 | - | -
run_podman update "${opts[@]}" $cid run_podman update "${opts[@]}" $cid
# ...and check one by one # ...and check one by one
defer-assertion-failures
for opt in "${opts[@]}"; do for opt in "${opts[@]}"; do
read path op expect <<<"${check[$opt]}" read path op expect <<<"${check[$opt]}"
run_podman exec $cid cat /sys/fs/cgroup/$path run_podman exec $cid cat /sys/fs/cgroup/$path
@ -126,6 +127,7 @@ device-write-iops = /dev/zero:4000 | - | -
updated="$(echo $output)" updated="$(echo $output)"
assert "$updated" $op "$expect" "$opt ($path)" assert "$updated" $op "$expect" "$opt ($path)"
done done
immediate-assertion-failures
# Clean up # Clean up
run_podman rm -f -t0 $cid run_podman rm -f -t0 $cid

View File

@ -37,6 +37,7 @@ load helpers
run_podman rm myc run_podman rm myc
} }
# bats test_tags=distro-integration
@test "podman run --cgroups=disabled keeps the current cgroup" { @test "podman run --cgroups=disabled keeps the current cgroup" {
skip_if_remote "podman-remote does not support --cgroups=disabled" skip_if_remote "podman-remote does not support --cgroups=disabled"
skip_if_rootless_cgroupsv1 skip_if_rootless_cgroupsv1

View File

@ -398,6 +398,8 @@ _EOF
_write_test_yaml command=id image=quay.io/libpod/userimage _write_test_yaml command=id image=quay.io/libpod/userimage
run_podman 125 play kube --build --start=false $PODMAN_TMPDIR/test.yaml run_podman 125 play kube --build --start=false $PODMAN_TMPDIR/test.yaml
assert "$output" =~ "initializing source docker://quay.io/libpod/userimage:latest: reading manifest latest in "
run_podman play kube --replace --context-dir=$PODMAN_TMPDIR --build --start=false $PODMAN_TMPDIR/test.yaml run_podman play kube --replace --context-dir=$PODMAN_TMPDIR --build --start=false $PODMAN_TMPDIR/test.yaml
run_podman inspect --format "{{ .Config.User }}" test_pod-test run_podman inspect --format "{{ .Config.User }}" test_pod-test
is "$output" bin "expect container within pod to run as the bin user" is "$output" bin "expect container within pod to run as the bin user"