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

Function createTestInventory

pkg/inventory/instructions_test.go:11–26  ·  view source on GitHub ↗

createTestInventory creates an inventory with the specified toolsets for testing. All toolsets are enabled by default using WithToolsets([]string{"all"}).

(toolsets []ToolsetMetadata)

Source from the content-addressed store, hash-verified

9// createTestInventory creates an inventory with the specified toolsets for testing.
10// All toolsets are enabled by default using WithToolsets([]string{"all"}).
11func createTestInventory(toolsets []ToolsetMetadata) *Inventory {
12 // Create tools for each toolset so they show up in AvailableToolsets()
13 var tools []ServerTool
14 for _, ts := range toolsets {
15 tools = append(tools, ServerTool{
16 Toolset: ts,
17 })
18 }
19
20 inv, _ := NewBuilder().
21 SetTools(tools).
22 WithToolsets([]string{"all"}).
23 Build()
24
25 return inv
26}
27
28func TestGenerateInstructions(t *testing.T) {
29 tests := []struct {

Calls 4

NewBuilderFunction · 0.85
BuildMethod · 0.80
WithToolsetsMethod · 0.80
SetToolsMethod · 0.80

Tested by

no test coverage detected