MCPcopy Index your code
hub / github.com/coder/coder / TestCopilot_KeyFailoverConfig

Function TestCopilot_KeyFailoverConfig

aibridge/provider/copilot_internal_test.go:58–66  ·  view source on GitHub ↗

TestCopilot_KeyFailoverConfig verifies that Copilot, being BYOK-only, returns a zero-value KeyFailoverConfig so that KeyFailoverTransport short-circuits and passes the request through unchanged.

(t *testing.T)

Source from the content-addressed store, hash-verified

56// returns a zero-value KeyFailoverConfig so that KeyFailoverTransport
57// short-circuits and passes the request through unchanged.
58func TestCopilot_KeyFailoverConfig(t *testing.T) {
59 t.Parallel()
60
61 p := NewCopilot(config.Copilot{})
62
63 cfg := p.KeyFailoverConfig(slog.Make())
64
65 assert.Equal(t, keypool.KeyFailoverConfig{}, cfg, "Copilot must return a zero-value KeyFailoverConfig to short-circuit the transport")
66}
67
68func TestCopilot_CreateInterceptor(t *testing.T) {
69 t.Parallel()

Callers

nothing calls this directly

Calls 3

KeyFailoverConfigMethod · 0.95
NewCopilotFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected