Merge pull request #316 from outis1one/claude/ionos-script-integration-x32ofw

Distinguish timeout from real TURN test failure, bump timeout to 20s
This commit is contained in:
Outis
2026-08-11 23:21:16 -04:00
committed by GitHub
2 changed files with 19 additions and 3 deletions
+7 -1
View File
@@ -179,10 +179,16 @@ else
# confirmed correctly reporting success (exit 0, real packet-loss
# stats) with valid credentials and failure ("Cannot complete
# Allocation", exit 255) with a wrong password.
OUT="$(docker exec coturn timeout 10 turnutils_uclient -u "$_u" -w "$_p" -y "$TEST_HOST" -p "$COTURN_PORT" 2>&1)"
OUT="$(docker exec coturn timeout 20 turnutils_uclient -u "$_u" -w "$_p" -y "$TEST_HOST" -p "$COTURN_PORT" 2>&1)"
RC=$?
if [ "$RC" -eq 0 ]; then
ok "$c: TURN allocation succeeded (credentials + relay range + reachability all confirmed working)"
elif [ "$RC" -eq 124 ]; then
# timeout(1)'s own exit code — no error was printed yet when the
# clock ran out, so this isn't a reported failure like "Cannot
# complete Allocation" would be. Worth a look, not a hard FAIL.
warn "$c: TURN test didn't finish within 20s (no error printed — likely still negotiating). Raw output so far:"
echo "$OUT" | tail -n 15 | sed 's/^/ /'
else
fail "$c: TURN allocation failed (exit $RC) — raw output:"
echo "$OUT" | tail -n 15 | sed 's/^/ /'
+12 -2
View File
@@ -232,9 +232,19 @@ else
# packet-loss stats) with valid credentials and correctly fails
# ("Cannot complete Allocation", exit 255) with a wrong password —
# a real pass/fail signal, not just "didn't crash."
OUT="$(docker exec "$COTURN_CONTAINER" timeout 10 turnutils_uclient -u "$TURN_USERNAME" -w "$TURN_PASSWORD" -y 127.0.0.1 -p "${TURN_PORT:-3478}" 2>&1)"
if [ $? -eq 0 ]; then
OUT="$(docker exec "$COTURN_CONTAINER" timeout 20 turnutils_uclient -u "$TURN_USERNAME" -w "$TURN_PASSWORD" -y 127.0.0.1 -p "${TURN_PORT:-3478}" 2>&1)"
RC=$?
if [ "$RC" -eq 0 ]; then
ok "Live TURN allocation succeeded with Asterisk's own configured credentials (user '$TURN_USERNAME')"
elif [ "$RC" -eq 124 ]; then
# timeout(1)'s own exit code — the process was still running
# (no error printed yet) when the clock ran out, not a reported
# failure. Different from an actual auth/allocation error, so
# don't conflate the two — a real error prints its own message
# (e.g. "Cannot complete Allocation") well before this.
warn "TURN test with Asterisk's credentials didn't finish within 20s (no error printed — likely still negotiating). Raw output so far:"
echo "$OUT" | tail -n 15 | sed 's/^/ /'
warn "Try running manually with more time: docker exec $COTURN_CONTAINER turnutils_uclient -u $TURN_USERNAME -w $TURN_PASSWORD -y 127.0.0.1 -p ${TURN_PORT:-3478}"
else
fail "Live TURN allocation FAILED with Asterisk's configured credentials — raw output:"
echo "$OUT" | tail -n 15 | sed 's/^/ /'