MCPcopy Create free account
hub / github.com/coder/coder / TestConnectAll_ConnectionFailure

Function TestConnectAll_ConnectionFailure

coderd/x/chatd/mcpclient/mcpclient_test.go:175–186  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

173}
174
175func TestConnectAll_ConnectionFailure(t *testing.T) {
176 t.Parallel()
177 ctx := context.Background()
178 logger := slogtest.Make(t, &slogtest.Options{IgnoreErrors: true})
179
180 cfg := makeConfig("bad", "http://127.0.0.1:0/does-not-exist")
181
182 tools, cleanup := mcpclient.ConnectAll(ctx, logger, []database.MCPServerConfig{cfg}, nil, uuid.Nil, nil, nil)
183 t.Cleanup(cleanup)
184
185 assert.Empty(t, tools, "no tools should be returned for an unreachable server")
186}
187
188func TestConnectAll_MultipleServers(t *testing.T) {
189 t.Parallel()

Callers

nothing calls this directly

Calls 4

ConnectAllFunction · 0.92
makeConfigFunction · 0.85
CleanupMethod · 0.65
EmptyMethod · 0.45

Tested by

no test coverage detected