chore: refactor cli and coderd to use ClientOptions (#19763)

Refactors CLI and coderd to use the ClientBuilder pattern rather than directly instantiating the Client.
This commit is contained in:
Spike Curtis
2025-09-22 21:02:56 +04:00
committed by GitHub
parent e7d648fb28
commit a30c30724b
5 changed files with 12 additions and 14 deletions
+1 -2
View File
@@ -1467,8 +1467,7 @@ func TestUserActivityInsights_Golden(t *testing.T) {
TokenName: "no-password-user-token",
})
require.NoError(t, err)
userClient := codersdk.New(client.URL)
userClient.SetSessionToken(token.Key)
userClient := codersdk.New(client.URL, codersdk.WithSessionToken(token.Key))
coderUser, err := userClient.User(context.Background(), user.id.String())
require.NoError(t, err)