Skip to content

Commit f7e0bc5

Browse files
Dumbrisclaude
andcommitted
fix(ci): fix E2E test and Windows npm install failures
**E2E Test Fix (TestE2E_InspectQuarantined):** - Fixed type assertion for mcp.TextContent in quarantine inspection test - Test was only checking for *mcp.TextContent (pointer) but content can be value type - Added value type check consistent with debug logging (lines 1073-1078) **Windows CI Fix:** - Added retry logic for npm ci on Windows using nick-fields/retry-action@v3 - Windows has intermittent EPERM errors during npm cleanup - 3 retry attempts with 5s wait and --prefer-offline flag - Only applies to Windows matrix (Unix uses standard npm ci) **Testing:** - Verified TestE2E_InspectQuarantined passes locally - Windows npm install will now retry on permission errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 442269a commit f7e0bc5

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/unit-tests.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,17 @@ jobs:
171171
with:
172172
node-version: '20'
173173

174-
- name: Install frontend dependencies
174+
- name: Install frontend dependencies (Windows)
175+
if: matrix.os == 'windows-latest'
176+
uses: nick-fields/retry-action@v3
177+
with:
178+
timeout_minutes: 10
179+
max_attempts: 3
180+
retry_wait_seconds: 5
181+
command: cd frontend && npm ci --prefer-offline
182+
183+
- name: Install frontend dependencies (Unix)
184+
if: matrix.os != 'windows-latest'
175185
run: cd frontend && npm ci
176186

177187
- name: Build frontend

internal/server/e2e_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,8 +1070,11 @@ func TestE2E_InspectQuarantined(t *testing.T) {
10701070
// Verify the result contains information about the tools
10711071
var resultText string
10721072
for _, content := range inspectResult.Content {
1073+
// Handle both pointer and value types
10731074
if textContent, ok := content.(*mcp.TextContent); ok {
10741075
resultText += textContent.Text
1076+
} else if textContent, ok := content.(mcp.TextContent); ok {
1077+
resultText += textContent.Text
10751078
}
10761079
}
10771080
assert.Contains(t, resultText, "test_tool_1", "Result should mention test_tool_1")

0 commit comments

Comments
 (0)