From fd0ff9060f1a41ea669af309b1e2ba5b68f18c2d Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Thu, 25 Jul 2024 05:49:42 -0600 Subject: [PATCH] CI: 700-play: fix a leaked non-safename Signed-off-by: Ed Santiago --- test/system/700-play.bats | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/system/700-play.bats b/test/system/700-play.bats index 337108f817..e547badf18 100644 --- a/test/system/700-play.bats +++ b/test/system/700-play.bats @@ -1043,10 +1043,11 @@ spec: grep -E -q "^containers:" /etc/subuid || skip "no IDs allocated for user 'containers'" fi - run_podman pod create --userns auto --name usernspod - run_podman create --pod usernspod $IMAGE true + podname="p-userns-$(safename)" + run_podman pod create --userns auto --name $podname + run_podman create --pod $podname $IMAGE true - run_podman pod inspect --format {{.InfraContainerID}} usernspod + run_podman pod inspect --format {{.InfraContainerID}} $podname infraID="$output" run_podman inspect --format '{{index .Config.Annotations "io.podman.annotations.userns"}}' $infraID @@ -1055,15 +1056,15 @@ spec: YAML=$PODMAN_TMPDIR/test.yml # Make sure the same setting is restored if the pod is recreated from the yaml - run_podman kube generate usernspod -f $YAML + run_podman kube generate $podname -f $YAML cat $YAML run_podman kube play --replace $YAML - run_podman pod inspect --format {{.InfraContainerID}} usernspod + run_podman pod inspect --format {{.InfraContainerID}} $podname infraID="$output" run_podman inspect --format '{{index .Config.Annotations "io.podman.annotations.userns"}}' $infraID assert "$output" == "auto" "user namespace should be kept" - run_podman pod rm -f usernspod + run_podman pod rm -f $podname }