mirror of
https://github.com/containers/podman.git
synced 2025-12-03 03:39:44 +08:00
Merge pull request #24861 from Luap99/debian-fixes
Some debian test fixes
This commit is contained in:
@@ -168,10 +168,10 @@ function check_shell_completion() {
|
||||
|
||||
*REGISTRY*)
|
||||
run_completion "$@" $cmd "${extra_args[@]}" ""
|
||||
### FIXME how can we get the configured registries?
|
||||
_check_completion_end NoFileComp
|
||||
### FIXME this fails if no registries are configured
|
||||
assert "${#lines[@]}" -gt 2 "$* $cmd: No REGISTRIES found in suggestions"
|
||||
# We can assume quay.io as we force our own CONTAINERS_REGISTRIES_CONF below.
|
||||
assert "${lines[0]}" == "quay.io" "unqualified-search-registries from registries.conf listed"
|
||||
|
||||
match=true
|
||||
# resume
|
||||
@@ -311,6 +311,11 @@ function _check_no_suggestions() {
|
||||
# create secret
|
||||
run_podman secret create $random_secret_name $secret_file
|
||||
|
||||
# create our own registries.conf so we know what registry is set
|
||||
local CONTAINERS_REGISTRIES_CONF="$PODMAN_TMPDIR/registries.conf"
|
||||
echo 'unqualified-search-registries = ["quay.io"]' > "$CONTAINERS_REGISTRIES_CONF"
|
||||
export CONTAINERS_REGISTRIES_CONF
|
||||
|
||||
# Called with no args -- start with 'podman --help'. check_shell_completion() will
|
||||
# recurse for any subcommands.
|
||||
check_shell_completion
|
||||
|
||||
@@ -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" "=~" \
|
||||
|
||||
Reference in New Issue
Block a user