MCPcopy Index your code
hub / github.com/github/github-mcp-server / mockToolWithFlags

Function mockToolWithFlags

pkg/inventory/registry_test.go:1048–1055  ·  view source on GitHub ↗

mockToolWithFlags creates a ServerTool with feature flags for testing

(name string, toolsetID string, readOnly bool, enableFlag, disableFlag string)

Source from the content-addressed store, hash-verified

1046
1047// mockToolWithFlags creates a ServerTool with feature flags for testing
1048func mockToolWithFlags(name string, toolsetID string, readOnly bool, enableFlag, disableFlag string) ServerTool {
1049 tool := mockTool(name, toolsetID, readOnly)
1050 tool.FeatureFlagEnable = enableFlag
1051 if disableFlag != "" {
1052 tool.FeatureFlagDisable = []string{disableFlag}
1053 }
1054 return tool
1055}
1056
1057func TestFeatureFlagEnable(t *testing.T) {
1058 tools := []ServerTool{

Calls 1

mockToolFunction · 0.70

Tested by

no test coverage detected