(t *testing.T)
| 100 | } |
| 101 | |
| 102 | func TestIsMCPScriptsEnabledWithEnv(t *testing.T) { |
| 103 | // Test config with tools |
| 104 | configWithTools := &MCPScriptsConfig{ |
| 105 | Tools: map[string]*MCPScriptToolConfig{ |
| 106 | "test": {Name: "test", Description: "Test tool"}, |
| 107 | }, |
| 108 | } |
| 109 | |
| 110 | // MCP Scripts are enabled by default when configured, environment variable no longer needed |
| 111 | t.Run("with tools - enabled regardless of GH_AW_FEATURES", func(t *testing.T) { |
| 112 | t.Setenv("GH_AW_FEATURES", "mcp-scripts") |
| 113 | result := IsMCPScriptsEnabled(configWithTools) |
| 114 | if !result { |
| 115 | t.Errorf("Expected true, got false") |
| 116 | } |
| 117 | }) |
| 118 | |
| 119 | t.Run("with tools and GH_AW_FEATURES=other - still enabled", func(t *testing.T) { |
| 120 | t.Setenv("GH_AW_FEATURES", "other") |
| 121 | result := IsMCPScriptsEnabled(configWithTools) |
| 122 | if !result { |
| 123 | t.Errorf("Expected true, got false") |
| 124 | } |
| 125 | }) |
| 126 | } |
| 127 | |
| 128 | // TestParseMCPScriptsAndExtractMCPScriptsConfigConsistency verifies that ParseMCPScripts |
| 129 | // and extractMCPScriptsConfig produce identical results for the same input. |
nothing calls this directly
no test coverage detected