Skip to content

Commit

Permalink
test/system: fix "podman play --build private registry" error
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Luap99 committed Dec 17, 2024
1 parent 23d4908 commit f2f6eb8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/system/700-play.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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" "=~" \
Expand Down

0 comments on commit f2f6eb8

Please sign in to comment.