mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-06-10 11:12:13 +00:00
test(remote): add unit + e2e suite for remote-services subsystem
Covers RemoteClient/RemoteService, REST routes, handlers, SessionStore, InputBridge, DownloadQueueManager, errors, compression, and serve CLI. E2e tier opts in via --live and can auto-spawn its own serve.
This commit is contained in:
29
tests/remote/e2e/test_live_remote_client.py
Normal file
29
tests/remote/e2e/test_live_remote_client.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""E2E: drive the full RemoteClient HTTP surface against the running serve."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
pytestmark = [pytest.mark.live]
|
||||
|
||||
|
||||
def test_remote_client_get_health(remote_client) -> None:
|
||||
body = remote_client.get("/api/health")
|
||||
assert body["status"] == "ok"
|
||||
assert "version" in body
|
||||
|
||||
|
||||
def test_remote_client_get_services(remote_client) -> None:
|
||||
body = remote_client.get("/api/services")
|
||||
assert "services" in body
|
||||
assert isinstance(body["services"], list)
|
||||
|
||||
|
||||
def test_remote_client_get_404_raises_systemexit(remote_client) -> None:
|
||||
with pytest.raises(SystemExit):
|
||||
remote_client.get("/api/session/this-does-not-exist")
|
||||
|
||||
|
||||
def test_remote_client_delete_404_raises_systemexit(remote_client) -> None:
|
||||
with pytest.raises(SystemExit):
|
||||
remote_client.delete("/api/session/this-does-not-exist")
|
||||
Reference in New Issue
Block a user