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

Function TestAdvisorToolRejectsMissingRuntime

coderd/x/chatd/chatadvisor/tool_test.go:254–266  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

252}
253
254func TestAdvisorToolRejectsMissingRuntime(t *testing.T) {
255 t.Parallel()
256
257 tool := chatadvisor.Tool(chatadvisor.ToolOptions{
258 GetConversationSnapshot: func() []fantasy.Message {
259 return nil
260 },
261 })
262
263 resp := runAdvisorTool(t, tool, chatadvisor.AdvisorArgs{Question: "Need advice"})
264 require.True(t, resp.IsError)
265 require.Contains(t, resp.Content, "advisor runtime is not configured")
266}
267
268func TestAdvisorToolRejectsMissingSnapshotFunc(t *testing.T) {
269 t.Parallel()

Callers

nothing calls this directly

Calls 3

ToolFunction · 0.92
runAdvisorToolFunction · 0.85
ContainsMethod · 0.45

Tested by

no test coverage detected