Add IPv6 cases to relay WS prepareURL tests

This commit is contained in:
Viktor Liu
2026-05-04 11:32:43 +02:00
parent a409678fe5
commit abccbdee9e

View File

@@ -41,6 +41,16 @@ func TestPrepareURL(t *testing.T) {
input: "rel://relay.example.com:45678",
want: "ws://relay.example.com:45678/relay",
},
{
name: "rel scheme with IPv6 and port",
input: "rel://[2001:db8::1]:45678",
want: "ws://[2001:db8::1]:45678/relay",
},
{
name: "rels scheme with IPv6 loopback and port",
input: "rels://[::1]:45678",
want: "wss://[::1]:45678/relay",
},
{
name: "unsupported scheme",
input: "http://test-domain-2:45678",