summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-06-09 16:09:15 -0400
committerGitHub <noreply@github.com>2022-06-09 16:09:15 -0400
commit6a2c0e96011d36e5b459a010d472facd26c67389 (patch)
tree3f66e9dfb2439d52cf0daef24ff1e1c522e38e78 /test
parentec7951bc1443a62c7a3398ddd77c2b928a2f9544 (diff)
parent2b97795c19bb95eda50f1c6b97bc4b8433b57009 (diff)
downloadpodman-6a2c0e96011d36e5b459a010d472facd26c67389.tar.gz
podman-6a2c0e96011d36e5b459a010d472facd26c67389.tar.bz2
podman-6a2c0e96011d36e5b459a010d472facd26c67389.zip
Merge pull request #14552 from edsantiago/apiv2_test_panic_fix
APIv2 tests: (try to) fix flaky registry panic
Diffstat (limited to 'test')
-rwxr-xr-xtest/apiv2/test-apiv210
1 files changed, 7 insertions, 3 deletions
diff --git a/test/apiv2/test-apiv2 b/test/apiv2/test-apiv2
index 6151b7672..8ecc2aa2d 100755
--- a/test/apiv2/test-apiv2
+++ b/test/apiv2/test-apiv2
@@ -443,12 +443,18 @@ function start_registry() {
# If invoked with auth=htpasswd, create credentials
REGISTRY_USERNAME=
REGISTRY_PASSWORD=
+ declare -a registry_auth_params=(-e "REGISTRY_AUTH=$auth")
if [[ "$auth" = "htpasswd" ]]; then
REGISTRY_USERNAME=u$(random_string 7)
REGISTRY_PASSWORD=p$(random_string 7)
htpasswd -Bbn ${REGISTRY_USERNAME} ${REGISTRY_PASSWORD} \
> $AUTHDIR/htpasswd
+
+ registry_auth_params+=(
+ -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm"
+ -e "REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd"
+ )
fi
# Run the registry, and wait for it to come up
@@ -456,9 +462,7 @@ function start_registry() {
-p ${REGISTRY_PORT}:5000 \
--name registry \
-v $AUTHDIR:/auth:Z \
- -e "REGISTRY_AUTH=$auth" \
- -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \
- -e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \
+ "${registry_auth_params[@]}" \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/auth/domain.crt \
-e REGISTRY_HTTP_TLS_KEY=/auth/domain.key \
${REGISTRY_IMAGE}