diff --git a/test/system/260-sdnotify.bats b/test/system/260-sdnotify.bats index 072c817a1e..f5394e7931 100644 --- a/test/system/260-sdnotify.bats +++ b/test/system/260-sdnotify.bats @@ -88,6 +88,7 @@ function _assert_mainpid_is_conmon() { ############################################################################### # BEGIN tests themselves +# bats test_tags=ci:parallel @test "sdnotify : ignore" { export NOTIFY_SOCKET=$PODMAN_TMPDIR/ignore.sock _start_socat @@ -105,12 +106,13 @@ function _assert_mainpid_is_conmon() { _stop_socat } -# bats test_tags=distro-integration +# bats test_tags=distro-integration, ci:parallel @test "sdnotify : conmon" { export NOTIFY_SOCKET=$PODMAN_TMPDIR/conmon.sock _start_socat - run_podman run -d --name sdnotify_conmon_c \ + ctrname=c-$(safename) + run_podman run -d --name $ctrname \ --sdnotify=conmon \ $IMAGE \ sh -c 'printenv NOTIFY_SOCKET;echo READY;sleep 999' @@ -120,10 +122,10 @@ function _assert_mainpid_is_conmon() { run_podman container inspect $cid --format "{{.Config.SdNotifyMode}} {{.Config.SdNotifySocket}}" is "$output" "conmon $NOTIFY_SOCKET" - run_podman container inspect sdnotify_conmon_c --format "{{.State.ConmonPid}}" + run_podman container inspect $ctrname --format "{{.State.ConmonPid}}" mainPID="$output" - run_podman logs sdnotify_conmon_c + run_podman logs $ctrname is "$output" "READY" "\$NOTIFY_SOCKET in container" # loop-wait for the final READY line @@ -143,7 +145,7 @@ READY=1" "sdnotify sent MAINPID and READY" # These tests can fail in dev. environment because of SELinux. # quick fix: chcon -t container_runtime_exec_t ./bin/podman -# bats test_tags=distro-integration +# bats test_tags=distro-integration, ci:parallel @test "sdnotify : container" { _prefetch $SYSTEMD_IMAGE @@ -184,6 +186,7 @@ READY=1" "Container log after ready signal" # These tests can fail in dev. environment because of SELinux. # quick fix: chcon -t container_runtime_exec_t ./bin/podman +# bats test_tags=ci:parallel @test "sdnotify : healthy" { export NOTIFY_SOCKET=$PODMAN_TMPDIR/container.sock _start_socat @@ -194,7 +197,7 @@ READY=1" "Container log after ready signal" # Create a container with a simple `/bin/true` healthcheck that we need to # run manually. - ctr=$(random_string) + ctr=c-$(safename) run_podman create --name $ctr \ --health-cmd=/bin/true \ --health-retries=1 \ @@ -254,16 +257,18 @@ READY=1" "Container log after healthcheck run" _stop_socat } +# bats test_tags=ci:parallel @test "sdnotify : play kube - no policies" { # Create the YAMl file yaml_source="$PODMAN_TMPDIR/test.yaml" + podname=p-$(safename) cat >$yaml_source <$yaml_source < $fname } -# bats test_tags=distro-integration +# bats test_tags=distro-integration, ci:parallel @test "podman kube play - exit-code propagation" { fname=$PODMAN_TMPDIR/$(random_string).yaml @@ -523,31 +527,30 @@ none | false | false | 0 # A final smoke test to make sure bogus policies lead to an error run_podman 125 kube play --service-exit-code-propagation=bogus --service-container $fname is "$output" "Error: unsupported exit-code propagation \"bogus\"" "error on unsupported exit-code propagation" - - run_podman rmi $(pause_image) - run_podman network rm podman-default-kube-network } +# CANNOT BE PARALLELIZED. I don't know why. It flakes. Still investigating. @test "podman pull - EXTEND_TIMEOUT_USEC" { # Make sure that Podman extends the start timeout via DBUS when running # inside a systemd unit (i.e., with NOTIFY_SOCKET set). Extending the # timeout works by continuously sending EXTEND_TIMEOUT_USEC; Podman does # this at most 10 times, adding up to ~5min. - image_on_local_registry=localhost:${PODMAN_LOGIN_REGISTRY_PORT}/name:tag + image_on_local_registry=localhost:${PODMAN_LOGIN_REGISTRY_PORT}/i-$(safename):tag registry_flags="--tls-verify=false --creds ${PODMAN_LOGIN_USER}:${PODMAN_LOGIN_PASS}" start_registry - export NOTIFY_SOCKET=$PODMAN_TMPDIR/notify.sock + export NOTIFY_SOCKET=$PODMAN_TMPDIR/notify-$(safename).sock _start_socat run_podman push $registry_flags $IMAGE $image_on_local_registry + run_podman pull $registry_flags $image_on_local_registry is "${lines[1]}" "Pulling image //$image_on_local_registry inside systemd: setting pull timeout to 5m0s" "NOTIFY_SOCKET is passed to container" + echo "$_LOG_PROMPT cat $_SOCAT_LOG" run cat $_SOCAT_LOG # The 'echo's help us debug failed runs - echo "socat log:" echo "$output" is "$output" "EXTEND_TIMEOUT_USEC=30000000" @@ -555,6 +558,7 @@ none | false | false | 0 _stop_socat } +# bats test_tags=ci:parallel @test "podman system service" { # This test makes sure that podman-system-service uses the NOTIFY_SOCKET # correctly and that it unsets it after sending the expected MAINPID and