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
@@ -845,8 +845,7 @@ func createAnotherUserRetry(t testing.TB, client *codersdk.Client, organizationI
require.NoError(t, err)
}
other := codersdk.New(client.URL)
other.SetSessionToken(sessionToken)
other := codersdk.New(client.URL, codersdk.WithSessionToken(sessionToken))
t.Cleanup(func() {
other.HTTPClient.CloseIdleConnections()
})