From fe05e25edfdfd848e3fe8c1360a8e3c864f72a56 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 28 May 2024 10:15:12 +0200 Subject: [PATCH] test/system: speed up podman run --name There is no reason for this check to wait 4 seconds for the container to run, instead make sure to have a running process and then stop it directly with -t0 not have any delay. Signed-off-by: Paul Holzinger --- test/system/030-run.bats | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/system/030-run.bats b/test/system/030-run.bats index bb12bf6826..823bd7d6ba 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -127,10 +127,7 @@ echo $rand | 0 | $rand @test "podman run --name" { randomname=$(random_string 30) - # Assume that 4 seconds gives us enough time for 3 quick tests (or at - # least for the 'ps'; the 'container exists' should pass even in the - # unlikely case that the container exits before we get to them) - run_podman run -d --name $randomname $IMAGE sleep 4 + run_podman run -d --name $randomname $IMAGE sleep inf cid=$output run_podman ps --format '{{.Names}}--{{.ID}}' @@ -140,7 +137,7 @@ echo $rand | 0 | $rand run_podman container exists $cid # Done with live-container tests; now let's test after container finishes - run_podman wait $cid + run_podman stop -t0 $cid # Container still exists even after stopping: run_podman container exists $randomname