diff --git a/scripts/smoke_fnos_storyforge_lan.sh b/scripts/smoke_fnos_storyforge_lan.sh index 1fa600e..7553113 100755 --- a/scripts/smoke_fnos_storyforge_lan.sh +++ b/scripts/smoke_fnos_storyforge_lan.sh @@ -51,11 +51,8 @@ echo "runtime config ok" echo "[3/6] check collector healthz" curl_fetch "$BACKEND_URL/healthz" >"$health_file" -python3 - "$health_file" "$CUTVIDEO_URL" <<'PY' -import json -import pathlib -import sys - +python3 -c ' +import json, pathlib, sys payload = json.loads(pathlib.Path(sys.argv[1]).read_text()) expected_cutvideo = sys.argv[2] if str(payload.get("status") or "").lower() != "ok": @@ -68,17 +65,14 @@ if lan_routing.get("cutvideoBaseUrl") != expected_cutvideo: if lan_routing.get("cutvideoRouteMode") != "fnos_tunnel": raise SystemExit(f"unexpected cutvideoRouteMode: {lan_routing.get('cutvideoRouteMode')!r}") print("healthz ok") -PY +' "$health_file" "$CUTVIDEO_URL" echo "[4/6] check auto-session" curl_fetch -X POST "$BACKEND_URL/v2/auth/auto-session" \ -H 'content-type: application/json' \ -d '{}' >"$session_file" -python3 - "$session_file" "$token_file" <<'PY' -import json -import pathlib -import sys - +python3 -c ' +import json, pathlib, sys payload = json.loads(pathlib.Path(sys.argv[1]).read_text()) token = str(payload.get("token") or "") mode = str(payload.get("mode") or "") @@ -91,17 +85,14 @@ if not username: raise SystemExit("auto-session returned empty username") pathlib.Path(sys.argv[2]).write_text(token, encoding="utf-8") print(f"auto-session ok: {username}") -PY +' "$session_file" "$token_file" token="$(cat "$token_file")" echo "[5/6] check integrations health" curl_fetch "$BACKEND_URL/v2/integrations/health" \ -H "Authorization: Bearer $token" >"$integrations_file" -python3 - "$integrations_file" "$CUTVIDEO_URL" <<'PY' -import json -import pathlib -import sys - +python3 -c ' +import json, pathlib, sys payload = json.loads(pathlib.Path(sys.argv[1]).read_text()) expected_cutvideo = sys.argv[2] cutvideo = payload.get("cutvideo") or {} @@ -112,21 +103,18 @@ if not cutvideo.get("reachable"): if not cutvideo.get("supports_uploads"): raise SystemExit("cutvideo uploads are not available") print("integrations ok") -PY +' "$integrations_file" "$CUTVIDEO_URL" echo "[6/6] check fnOS tunnel endpoints" curl_fetch "$CUTVIDEO_URL/api/bootstrap" >"$bootstrap_file" curl_fetch "$COMPAT_URL/" >"$compat_file" -python3 - "$bootstrap_file" <<'PY' -import json -import pathlib -import sys - +python3 -c ' +import json, pathlib, sys payload = json.loads(pathlib.Path(sys.argv[1]).read_text()) if not payload: raise SystemExit("empty cutvideo bootstrap payload") print("cutvideo bootstrap ok") -PY +' "$bootstrap_file" echo "compat ok" echo "fnOS lan smoke passed:"