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

Function newInternalTestServer

coderd/x/chatd/subagent_internal_test.go:72–86  ·  view source on GitHub ↗

newInternalTestServer creates a Server for internal tests with custom provider API keys. The server is automatically closed when the test finishes.

(
	t *testing.T,
	db database.Store,
	ps pubsub.Pubsub,
	keys chatprovider.ProviderAPIKeys,
)

Source from the content-addressed store, hash-verified

70// custom provider API keys. The server is automatically closed
71// when the test finishes.
72func newInternalTestServer(
73 t *testing.T,
74 db database.Store,
75 ps pubsub.Pubsub,
76 keys chatprovider.ProviderAPIKeys,
77) *Server {
78 return newInternalTestServerWithLoggerAndClock(
79 t,
80 db,
81 ps,
82 keys,
83 slogtest.Make(t, &slogtest.Options{IgnoreErrors: true}),
84 nil,
85 )
86}
87
88func newInternalTestServerWithClock(
89 t *testing.T,

Tested by

no test coverage detected