From 6d872f45aa14936518bde3d81247f6001bceb600 Mon Sep 17 00:00:00 2001 From: ShukeBta <272197458+ShukeBta@users.noreply.github.com> Date: Tue, 16 Jun 2026 00:28:21 +0800 Subject: [PATCH] Fix smoke DLNA assertion --- scripts/smoke-test.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/smoke-test.sh b/scripts/smoke-test.sh index 9139f5d..854eb38 100755 --- a/scripts/smoke-test.sh +++ b/scripts/smoke-test.sh @@ -30,6 +30,11 @@ PASS=0 FAIL=0 cleanup() { + status=$? + if [ "$status" -ne 0 ] && [ -f "$LOG" ]; then + printf "\n\033[1;31m==> Server log tail after failure\033[0m\n" >&2 + tail -200 "$LOG" >&2 || true + fi if [ -n "${PID:-}" ]; then kill -TERM "$PID" 2>/dev/null || true wait "$PID" 2>/dev/null || true @@ -276,7 +281,7 @@ curl -s -o /dev/null -w "%{http_code}" -H "$H" "http://127.0.0.1:$PORT/api/files # DLNA discovery (no devices on container — must return empty array) curl -s -H "$H" "http://127.0.0.1:$PORT/api/dlna/devices" \ - | python3 -c 'import json,sys;assert json.load(sys.stdin)["devices"] == [] or isinstance(json.load(sys.stdin)["devices"], list)' \ + | python3 -c 'import json,sys;d=json.load(sys.stdin);assert isinstance(d["devices"], list)' \ && ok "dlna devices endpoint" || fail "dlna devices" # Scheduler status