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

Function TestExpMcpServerNoCredentials

cli/exp_mcp_test.go:170–192  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

168}
169
170func TestExpMcpServerNoCredentials(t *testing.T) {
171 t.Parallel()
172
173 ctx := testutil.Context(t, testutil.WaitShort)
174 cancelCtx, cancel := context.WithCancel(ctx)
175 t.Cleanup(cancel)
176
177 client := coderdtest.New(t, nil)
178 socketPath := filepath.Join(t.TempDir(), "nonexistent.sock")
179 inv, root := clitest.New(t,
180 "exp", "mcp", "server",
181 "--socket-path", socketPath,
182 )
183 inv = inv.WithContext(cancelCtx)
184
185 pty := ptytest.New(t)
186 inv.Stdin = pty.Input()
187 inv.Stdout = pty.Output()
188 clitest.SetupConfig(t, client, root)
189
190 err := inv.Run()
191 assert.ErrorContains(t, err, "are not logged in")
192}
193
194func TestExpMcpConfigureClaudeCode(t *testing.T) {
195 t.Parallel()

Callers

nothing calls this directly

Calls 11

ContextFunction · 0.92
NewFunction · 0.92
NewFunction · 0.92
NewFunction · 0.92
SetupConfigFunction · 0.92
WithContextMethod · 0.80
CleanupMethod · 0.65
TempDirMethod · 0.65
InputMethod · 0.65
OutputMethod · 0.65
RunMethod · 0.65

Tested by

no test coverage detected