Skip to content

Commit 5b20a29

Browse files
committed
fix urls
1 parent 452cc69 commit 5b20a29

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Coder-Desktop/VPNLibTests/CoderRouterTests.swift

+9-9
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct CoderRouterTests {
2121
@Test("RDP routes", arguments: [
2222
// Valid routes
2323
RouteTestCase(
24-
urlString: "https://coder.example.com/v0/open/ws/myworkspace/agent/dev/rdp?username=user&password=pass",
24+
urlString: "coder://coder.example.com/v0/open/ws/myworkspace/agent/dev/rdp?username=user&password=pass",
2525
expectedRoute: .open(
2626
workspace: "myworkspace",
2727
agent: "dev",
@@ -30,7 +30,7 @@ struct CoderRouterTests {
3030
description: "RDP with username and password"
3131
),
3232
RouteTestCase(
33-
urlString: "https://coder.example.com/v0/open/ws/workspace-123/agent/agent-456/rdp",
33+
urlString: "coder://coder.example.com/v0/open/ws/workspace-123/agent/agent-456/rdp",
3434
expectedRoute: .open(
3535
workspace: "workspace-123",
3636
agent: "agent-456",
@@ -39,7 +39,7 @@ struct CoderRouterTests {
3939
description: "RDP without credentials"
4040
),
4141
RouteTestCase(
42-
urlString: "https://coder.example.com/v0/open/ws/workspace-123/agent/agent-456/rdp?username=user",
42+
urlString: "coder://coder.example.com/v0/open/ws/workspace-123/agent/agent-456/rdp?username=user",
4343
expectedRoute: .open(
4444
workspace: "workspace-123",
4545
agent: "agent-456",
@@ -48,7 +48,7 @@ struct CoderRouterTests {
4848
description: "RDP with username only"
4949
),
5050
RouteTestCase(
51-
urlString: "https://coder.example.com/v0/open/ws/workspace-123/agent/agent-456/rdp?password=pass",
51+
urlString: "coder://coder.example.com/v0/open/ws/workspace-123/agent/agent-456/rdp?password=pass",
5252
expectedRoute: .open(
5353
workspace: "workspace-123",
5454
agent: "agent-456",
@@ -57,7 +57,7 @@ struct CoderRouterTests {
5757
description: "RDP with password only"
5858
),
5959
RouteTestCase(
60-
urlString: "https://coder.example.com/v0/open/ws/ws-special-chars/agent/agent-with-dashes/rdp",
60+
urlString: "coder://coder.example.com/v0/open/ws/ws-special-chars/agent/agent-with-dashes/rdp",
6161
expectedRoute: .open(
6262
workspace: "ws-special-chars",
6363
agent: "agent-with-dashes",
@@ -68,22 +68,22 @@ struct CoderRouterTests {
6868
6969
// Invalid routes
7070
RouteTestCase(
71-
urlString: "https://coder.example.com/invalid/path",
71+
urlString: "coder://coder.example.com/invalid/path",
7272
expectedRoute: nil,
7373
description: "Completely invalid path"
7474
),
7575
RouteTestCase(
76-
urlString: "https://coder.example.com/v1/open/ws/workspace-123/agent/agent-456/rdp",
76+
urlString: "coder://coder.example.com/v1/open/ws/workspace-123/agent/agent-456/rdp",
7777
expectedRoute: nil,
7878
description: "Invalid version prefix (v1 instead of v0)"
7979
),
8080
RouteTestCase(
81-
urlString: "https://coder.example.com/v0/open/workspace-123/agent/agent-456/rdp",
81+
urlString: "coder://coder.example.com/v0/open/workspace-123/agent/agent-456/rdp",
8282
expectedRoute: nil,
8383
description: "Missing 'ws' segment"
8484
),
8585
RouteTestCase(
86-
urlString: "https://coder.example.com/v0/open/ws/workspace-123/rdp",
86+
urlString: "coder://coder.example.com/v0/open/ws/workspace-123/rdp",
8787
expectedRoute: nil,
8888
description: "Missing agent segment"
8989
),

0 commit comments

Comments
 (0)