Merge pull request #21455 from vrothberg/resolve-endpoint

add new libpod/images/$name/resolve endpoint
This commit is contained in:
openshift-merge-bot[bot]
2024-01-31 21:06:57 +00:00
committed by GitHub
6 changed files with 87 additions and 1 deletions

View File

@@ -325,4 +325,22 @@ t DELETE images/$iid_test2?noprune=false 200
t GET libpod/images/$iid_test1/exists 404
t GET libpod/images/$iid_test2/exists 404
# If the /resolve tests fail, make sure to use ../registries.conf for the
# podman-service.
# With an alias, we only get one item back.
t GET libpod/images/podman-desktop-test123:this/resolve 200 \
.Names[0]="florent.fr/will/like:this"
# If no alias matches, we will get a candidate for each unqualified-search
# registry.
t GET libpod/images/no-alias-for-sure/resolve 200 \
.Names[0]="docker.io/library/no-alias-for-sure:latest" \
.Names[1]="quay.io/no-alias-for-sure:latest" \
.Names[2]="registry.fedoraproject.org/no-alias-for-sure:latest"
# Test invalid input.
t GET libpod/images/noCAPITALcharAllowed/resolve 400 \
.cause="repository name must be lowercase"
# vim: filetype=sh

View File

@@ -448,7 +448,8 @@ function start_service() {
$PODMAN_BIN unshare true
fi
$PODMAN_BIN \
CONTAINERS_REGISTRIES_CONF=$TESTS_DIR/../registries.conf \
$PODMAN_BIN \
--root $WORKDIR/server_root --syslog=true \
system service \
--time 0 \

View File

@@ -21,3 +21,7 @@ location="quay.io/libpod"
[[registry]]
location="localhost:5000"
insecure=true
# Alias used in tests.
[aliases]
"podman-desktop-test123"="florent.fr/will/like"