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

Function TestAllowedExploreToolNames

coderd/x/chatd/chatd_internal_test.go:551–585  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

549}
550
551func TestAllowedExploreToolNames(t *testing.T) {
552 t.Parallel()
553
554 externalConfigID := uuid.New()
555 got := allowedExploreToolNames([]fantasy.AgentTool{
556 newTestAgentTool("read_file"),
557 newTestAgentTool("write_file"),
558 newTestMCPAgentTool("external-mcp__echo", externalConfigID),
559 newTestAgentTool("workspace-mcp__echo"),
560 newTestAgentTool("start_workspace"),
561 newTestAgentTool("stop_workspace"),
562 newTestAgentTool("execute"),
563 newTestAgentTool("process_output"),
564 newTestAgentTool("process_list"),
565 newTestAgentTool("process_signal"),
566 newTestAgentTool("spawn_agent"),
567 newTestAgentTool("wait_agent"),
568 newTestAgentTool("read_skill"),
569 newTestAgentTool("read_skill_file"),
570 newTestAgentTool("ask_user_question"),
571 })
572
573 require.Equal(t, []string{
574 "read_file",
575 "external-mcp__echo",
576 "execute",
577 "process_output",
578 "read_skill",
579 "read_skill_file",
580 }, got)
581 require.NotContains(t, got, "workspace-mcp__echo")
582 require.NotContains(t, got, "start_workspace")
583 require.NotContains(t, got, "stop_workspace")
584 require.NotContains(t, got, "ask_user_question")
585}
586
587func TestAllowedBehaviorToolNames(t *testing.T) {
588 t.Parallel()

Callers

nothing calls this directly

Calls 5

allowedExploreToolNamesFunction · 0.85
newTestAgentToolFunction · 0.85
newTestMCPAgentToolFunction · 0.85
NewMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected