@@ -338,7 +338,7 @@ func TestWorkspaceAgentConnectRPC(t *testing.T) {
338
338
ctx , cancel := context .WithTimeout (context .Background (), testutil .WaitLong )
339
339
defer cancel ()
340
340
341
- conn , err := workspacesdk .NewClient (client ).
341
+ conn , err := workspacesdk .New (client ).
342
342
DialAgent (ctx , resources [0 ].Agents [0 ].ID , nil )
343
343
require .NoError (t , err )
344
344
defer func () {
@@ -454,7 +454,7 @@ func TestWorkspaceAgentTailnet(t *testing.T) {
454
454
ctx , cancel := context .WithTimeout (context .Background (), testutil .WaitLong )
455
455
defer cancel () // Connection should remain open even if the dial context is canceled.
456
456
457
- return workspacesdk .NewClient (client ).
457
+ return workspacesdk .New (client ).
458
458
DialAgent (ctx , resources [0 ].Agents [0 ].ID , & workspacesdk.DialAgentOptions {
459
459
Logger : slogtest .Make (t , nil ).Named ("client" ).Leveled (slog .LevelDebug ),
460
460
})
@@ -566,7 +566,7 @@ func TestWorkspaceAgentTailnetDirectDisabled(t *testing.T) {
566
566
}
567
567
}
568
568
569
- conn , err := workspacesdk .NewClient (client ).
569
+ conn , err := workspacesdk .New (client ).
570
570
DialAgent (ctx , resources [0 ].Agents [0 ].ID , & workspacesdk.DialAgentOptions {
571
571
Logger : slogtest .Make (t , nil ).Named ("client" ).Leveled (slog .LevelDebug ),
572
572
})
@@ -1631,7 +1631,7 @@ func TestWorkspaceAgent_UpdatedDERP(t *testing.T) {
1631
1631
ctx , cancel := context .WithTimeout (context .Background (), testutil .WaitLong )
1632
1632
defer cancel () // Connection should remain open even if the dial context is canceled.
1633
1633
1634
- return workspacesdk .NewClient (client ).
1634
+ return workspacesdk .New (client ).
1635
1635
DialAgent (ctx , agentID , & workspacesdk.DialAgentOptions {
1636
1636
Logger : logger .Named ("client1" ),
1637
1637
})
@@ -1677,7 +1677,7 @@ func TestWorkspaceAgent_UpdatedDERP(t *testing.T) {
1677
1677
require .True (t , ok )
1678
1678
1679
1679
// Connect from a second client.
1680
- conn2 , err := workspacesdk .NewClient (client ).
1680
+ conn2 , err := workspacesdk .New (client ).
1681
1681
DialAgent (ctx , agentID , & workspacesdk.DialAgentOptions {
1682
1682
Logger : logger .Named ("client2" ),
1683
1683
})
0 commit comments