diff --git a/scripts/run-registry-tests.sh b/scripts/run-registry-tests.sh index ea34739c..cd899949 100755 --- a/scripts/run-registry-tests.sh +++ b/scripts/run-registry-tests.sh @@ -22,12 +22,17 @@ corepack pnpm install corepack pnpm test echo "Verifying HTTP responses..." +declare -A extra_headers=( + [https://gitea.bytelyst.com/api/packages/ByteLyst/npm/]="-H Authorization: token ${GITEA_NPM_TOKEN}" +) + for url in \ https://api.bytelyst.com/platform/health \ https://gitea.bytelyst.com/api/packages/ByteLyst/npm/ \ https://ollama.bytelyst.com/api/version \ ; do - if curl -sSfI "$url" >/tmp/last-curl.out; then + headers=${extra_headers[$url]:-} + if curl -sSfI $headers "$url" >/tmp/last-curl.out; then status=$(head -n1 /tmp/last-curl.out) echo "$url -> $status" else