fix(test): follow redirect with curl -L in test.sh
Docker Build and Push / lint (pull_request) Successful in 6s
Docker Build and Push / build (pull_request) Successful in 2m30s
Docker Build and Push / test (pull_request) Successful in 19s
Docker Build and Push / push (pull_request) Has been skipped

SABnzbd redirects to /wizard/ on first run (303). Without -L,
the test gets the redirect body (no "SABnzbd" text). With -L,
curl follows to the wizard page which contains the expected text.
This commit is contained in:
2026-06-12 09:06:47 -04:00
parent 2d9c22701b
commit f6bf0cf2fa
+2 -2
View File
@@ -70,7 +70,7 @@ done
echo "" echo ""
echo "Test: GET / (SABnzbd web UI)" echo "Test: GET / (SABnzbd web UI)"
RESPONSE=$(curl -s -D - "$BASE_URL/") RESPONSE=$(curl -sL -D - "$BASE_URL/")
STATUS=$(echo "$RESPONSE" | head -1 | grep -oP '\d{3}') STATUS=$(echo "$RESPONSE" | head -1 | grep -oP '\d{3}')
BODY=$(echo "$RESPONSE" | sed -n '/^\r$/,$p' | tail -n +2) BODY=$(echo "$RESPONSE" | sed -n '/^\r$/,$p' | tail -n +2)
@@ -79,4 +79,4 @@ assert_match "Body contains SABnzbd" "[Ss][Aa][Bb].*[Nn]zbd" "$BODY"
echo "" echo ""
echo "Results: $PASSED/$TOTAL passed, $FAILED failed" echo "Results: $PASSED/$TOTAL passed, $FAILED failed"
[ "$FAILED" -eq 0 ] [ "$FAILED" -eq 0 ]