createTestInventory creates an inventory with the specified toolsets for testing. All toolsets are enabled by default using WithToolsets([]string{"all"}).
(toolsets []ToolsetMetadata)
| 9 | // createTestInventory creates an inventory with the specified toolsets for testing. |
| 10 | // All toolsets are enabled by default using WithToolsets([]string{"all"}). |
| 11 | func 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 | |
| 28 | func TestGenerateInstructions(t *testing.T) { |
| 29 | tests := []struct { |
no test coverage detected