MCPcopy Create free account
hub / github.com/github/copilot-sdk / TestToolSet_rejectsInvalidNames

Function TestToolSet_rejectsInvalidNames

go/toolset_test.go:53–72  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

51}
52
53func TestToolSet_rejectsInvalidNames(t *testing.T) {
54 cases := []struct {
55 name string
56 fn func()
57 }{
58 {"colon in builtin", func() { NewToolSet().AddBuiltIn("has:colon") }},
59 {"space in mcp", func() { NewToolSet().AddMCP("has space") }},
60 {"empty custom", func() { NewToolSet().AddCustom("") }},
61 }
62 for _, c := range cases {
63 t.Run(c.name, func(t *testing.T) {
64 defer func() {
65 if r := recover(); r == nil {
66 t.Fatal("expected panic, got none")
67 }
68 }()
69 c.fn()
70 })
71 }
72}
73
74func TestBuiltInToolsIsolated_membership(t *testing.T) {
75 for _, banned := range []string{"bash", "edit", "grep", "web_fetch"} {

Callers

nothing calls this directly

Calls 4

NewToolSetFunction · 0.85
AddBuiltInMethod · 0.80
AddMCPMethod · 0.80
AddCustomMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…