Skip to content

Commit b2e45e6

Browse files
Copilotpelikhan
andcommitted
Fix CodexAIConfiguration test for CLI argument approach
- Update test to check for --mcp-config CLI argument instead of file generation - Verify mcpServers appears in JSON string, not in file - Ensure file-based MCP config generation is NOT present for Claude Progress: Down to 4 remaining test failures, all related to checking for MCP config in CLI vs file. Co-authored-by: pelikhan <[email protected]>
1 parent 2d687a1 commit b2e45e6

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

pkg/workflow/codex_test.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,16 @@ This is a test workflow.
181181
if !strings.Contains(lockContent, "cat $GH_AW_PROMPT >> $GITHUB_STEP_SUMMARY") {
182182
t.Errorf("Expected lock file to contain prompt printing command but it didn't.\nContent:\n%s", lockContent)
183183
}
184-
// Check that mcp-servers.json is generated (not config.toml)
185-
if !strings.Contains(lockContent, "cat > /tmp/gh-aw/mcp-config/mcp-servers.json") {
186-
t.Errorf("Expected lock file to contain mcp-servers.json generation for claude but it didn't.\nContent:\n%s", lockContent)
184+
// Check that MCP config is passed via CLI argument (not file)
185+
if !strings.Contains(lockContent, "--mcp-config") {
186+
t.Errorf("Expected lock file to contain --mcp-config CLI argument but it didn't.\nContent:\n%s", lockContent)
187187
}
188-
if !strings.Contains(lockContent, "\"mcpServers\":") {
189-
t.Errorf("Expected lock file to contain '\"mcpServers\":' section in mcp-servers.json but it didn't.\nContent:\n%s", lockContent)
188+
if !strings.Contains(lockContent, "mcpServers") {
189+
t.Errorf("Expected lock file to contain 'mcpServers' in CLI argument JSON but it didn't.\nContent:\n%s", lockContent)
190+
}
191+
// Ensure it does NOT contain file-based MCP config generation
192+
if strings.Contains(lockContent, "cat > /tmp/gh-aw/mcp-config/mcp-servers.json") {
193+
t.Errorf("Did not expect lock file to contain mcp-servers.json file generation for claude (using CLI arg instead).\nContent:\n%s", lockContent)
190194
}
191195
// Ensure it does NOT contain codex
192196
if strings.Contains(lockContent, "codex exec") {

0 commit comments

Comments
 (0)