From 3ebb822e21a1d9b4982bdaf03742d0774e79216f Mon Sep 17 00:00:00 2001 From: Ygal Blum Date: Mon, 2 Jan 2023 14:19:32 +0200 Subject: [PATCH] System Test Quadlet - Volume dependency test did not test the dependency Make sure the Container unit correctly references the volume Start the Container service and not the Volume one Remove the volume Print the name of the service when status does not match Signed-off-by: Ygal Blum --- test/system/252-quadlet.bats | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/test/system/252-quadlet.bats b/test/system/252-quadlet.bats index 964bb9c212..ee2b8e3c54 100644 --- a/test/system/252-quadlet.bats +++ b/test/system/252-quadlet.bats @@ -101,7 +101,7 @@ function service_cleanup() { if [[ -n "$expected_state" ]]; then run systemctl show --property=ActiveState "$service" assert "$output" = "ActiveState=$expected_state" \ - "state of service after systemctl stop" + "state of service $service after systemctl stop" fi rm -f "$UNIT_DIR/$service" @@ -246,13 +246,17 @@ EOF # A quadlet container depends on a quadlet volume @test "quadlet - volume dependency" { - local quadlet_vol_file=$PODMAN_TMPDIR/dep_$(random_string).volume + # Save the unit name to use as the volume for the container + local quadlet_vol_unit=dep_$(random_string).volume + local quadlet_vol_file=$PODMAN_TMPDIR/${quadlet_vol_unit} cat > $quadlet_vol_file <