mirror of
https://github.com/Monkopedia/rouse-context.git
synced 2026-11-30 03:32:28 +00:00
Scenarios 5-10, 17-20 now use TunnelClientImpl + MtlsWebSocketFactory instead of manually constructing WebSocket connections and pumping mux frames. This ensures the production incomingSessions flow and MuxDemux wiring are tested end-to-end against the real relay binary. Extract shared test utilities into TestRelayFixture.kt: - TestCertificateAuthority: generates CA, relay, and device certs via keytool - TestRelayManager: starts/stops relay subprocess, waits for ready - TestSslContexts: factory methods for mTLS, device server, AI client contexts - buildSyntheticClientHello / findFreePort / findRelayBinary: shared helpers Add MtlsWebSocketFactory: a WebSocketFactory backed by Java's HttpClient that properly presents client certificates (unlike Ktor CIO). Add new test scenarios: - Scenario 19: multiple sequential TLS messages through tunnel - Scenario 20: full session lifecycle (connect, stream, disconnect, reconnect) Net effect: -638 lines of duplicated cert/relay/SSL code across the two test files, replaced with shared utilities. Both test classes now import from TestRelayFixture instead of maintaining their own copies. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| bridge | ||
| mcp | ||
| tunnel | ||