refactor: migrate from clientSessionKey to clientId identity
This commit is contained in:
@@ -13,12 +13,24 @@ describe("relay websocket URL versioning", () => {
|
||||
endpoint: "relay.paseo.sh:443",
|
||||
serverId: "srv_test",
|
||||
role: "client",
|
||||
clientSessionKey: "clsk_test",
|
||||
})
|
||||
);
|
||||
|
||||
expect(url.searchParams.get("v")).toBe(CURRENT_RELAY_PROTOCOL_VERSION);
|
||||
expect(url.searchParams.get("clientId")).toBe("clsk_test");
|
||||
expect(url.searchParams.has("connectionId")).toBe(false);
|
||||
});
|
||||
|
||||
test("includes connectionId when provided (server data sockets)", () => {
|
||||
const url = new URL(
|
||||
buildRelayWebSocketUrl({
|
||||
endpoint: "relay.paseo.sh:443",
|
||||
serverId: "srv_test",
|
||||
role: "server",
|
||||
connectionId: "conn_abc123",
|
||||
})
|
||||
);
|
||||
|
||||
expect(url.searchParams.get("connectionId")).toBe("conn_abc123");
|
||||
});
|
||||
|
||||
test("allows explicitly requesting v1 relay URLs", () => {
|
||||
|
||||
Reference in New Issue
Block a user