mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-05 23:45:07 +00:00
feat(remote)!: make remote serve WebSocket-only and refuse older clients with CLIENT_OUTDATED
This commit is contained in:
@@ -17,6 +17,8 @@ import time
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.remote.e2e.channel import open_session
|
||||
|
||||
pytestmark = [pytest.mark.live, pytest.mark.slow]
|
||||
|
||||
|
||||
@@ -31,7 +33,7 @@ def wait_titles(http_session, server_url: str, sid: str, timeout: float = 120.0)
|
||||
body = r.json()
|
||||
except Exception:
|
||||
body = {}
|
||||
if (body.get("details") or {}).get("auth_status") in ("authenticating", "pending_input"):
|
||||
if (body.get("details") or {}).get("auth_status") == "authenticating":
|
||||
time.sleep(2.0)
|
||||
continue
|
||||
return None
|
||||
@@ -64,16 +66,16 @@ def test_license_server_cdm(http_session, server_url: str, service_case) -> None
|
||||
if not title_input:
|
||||
pytest.skip(f"{service}: no title/series in fixture")
|
||||
|
||||
r = http_session.post(
|
||||
f"{server_url}/api/session/create",
|
||||
json={
|
||||
r = open_session(
|
||||
http_session,
|
||||
server_url,
|
||||
{
|
||||
"service": service,
|
||||
"title_id": title_input,
|
||||
"range_": ["SDR"],
|
||||
"vcodec": ["AVC"],
|
||||
"best_available": True,
|
||||
},
|
||||
timeout=120,
|
||||
)
|
||||
if r.status_code >= 400:
|
||||
pytest.skip(f"{service}: session create failed {r.status_code}: {r.text[:200]}")
|
||||
|
||||
Reference in New Issue
Block a user