chore: refactor CLI agent auth tests as unit tests (#19609)

Fixes https://github.com/coder/internal/issues/933

Refactors CLI tests that check the `--auth` flag parsing for various public clouds into a unit test that just creates the agent Client and asserts on the type.

Testing that the agent client actually authenticates correctly with these auth types is well covered by Coderd tests, so we don't need to retread that ground here, and the deleted tests were flaky on Windows.
This commit is contained in:
Spike Curtis
2025-09-03 10:49:19 +04:00
committed by GitHub
parent 1354d84eb4
commit 18945a7949
12 changed files with 129 additions and 237 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ func gitssh() *serpent.Command {
return err
}
client, err := agentAuth.CreateClient(ctx)
client, err := agentAuth.CreateClient()
if err != nil {
return xerrors.Errorf("create agent client: %w", err)
}