mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-04 23:15:07 +00:00
fix(log): redact the debug_requests record and write each body to a file in a per-run folder
This commit is contained in:
@@ -487,8 +487,9 @@ def test_server_request_records_never_reach_the_remote_client(
|
||||
entries = [e for e in records if e.get("operation") == "http_request"]
|
||||
assert {"/v1/init", "/v1/init-rnet", "/v1/titles", "/v1/titles-rnet"} <= {e["request"]["path"] for e in entries}
|
||||
server_host = server.url.split("://")[1].rstrip("/")
|
||||
assert all("body" not in e["response"] for e in entries)
|
||||
own = [e for e in entries if e["request"]["host"] == server_host and e["request"]["path"].endswith("/titles")]
|
||||
assert own and all(isinstance(e["response"]["body"], dict) for e in own)
|
||||
assert own and all((tmp_path / "server" / e["response"]["body_file"]).is_file() for e in own)
|
||||
|
||||
|
||||
def test_an_open_channel_keeps_the_session_alive(server: SimpleNamespace, monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
|
||||
Reference in New Issue
Block a user