From f2f6eb88e94824a8e1e472adcae8d4327e5aac6f Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 17 Dec 2024 17:20:28 +0100 Subject: [PATCH] test/system: fix "podman play --build private registry" error When running this test on a system without unqualifiedsearch registries it will fail with a different error causing the test to fail. to avoid that case define our own registries.conf that defines quay.io as registry. This should make the test pass in the debian env. Signed-off-by: Paul Holzinger --- test/system/700-play.bats | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/system/700-play.bats b/test/system/700-play.bats index a4dc40cd55..762d810362 100644 --- a/test/system/700-play.bats +++ b/test/system/700-play.bats @@ -1001,6 +1001,14 @@ _EOF # Remove the local image to make sure it will be pulled again run_podman image rm --ignore $from_image + # The error below assumes unqualified-search registries exist, however the default + # distro config may not set some and thus resulting in a different error message. + # We could try to match a third or or simply force a know static config to trigger + # the right error. + local CONTAINERS_REGISTRIES_CONF="$PODMAN_TMPDIR/registries.conf" + echo 'unqualified-search-registries = ["quay.io"]' > "$CONTAINERS_REGISTRIES_CONF" + export CONTAINERS_REGISTRIES_CONF + _write_test_yaml command=id image=$userimage run_podman 125 play kube --build --start=false $TESTYAML assert "$output" "=~" \