Skip to content

Commit 0abfcc3

Browse files
lpcoxCopilot
andcommitted
fix: skip playwright integration test on Docker network failures
When the Docker registry is unreachable (proxy timeout, connection refused), the test should skip gracefully instead of fatally failing, since the network issue is environmental rather than a code bug. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 195cbb4 commit 0abfcc3

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

test/integration/playwright_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,14 @@ CMD ["node", "mock-mcp-server.js"]
388388
buildCmd := exec.Command("docker", "build", "-t", imageName, tmpDir)
389389
buildOutput, err := buildCmd.CombinedOutput()
390390
if err != nil {
391-
t.Logf("Build output:\n%s", string(buildOutput))
391+
outputStr := string(buildOutput)
392+
t.Logf("Build output:\n%s", outputStr)
393+
// Skip if the failure is due to network issues (can't pull base image)
394+
if strings.Contains(outputStr, "failed to resolve source metadata") ||
395+
strings.Contains(outputStr, "i/o timeout") ||
396+
strings.Contains(outputStr, "connection refused") {
397+
t.Skipf("Skipping test: Docker build failed due to network issues: %v", err)
398+
}
392399
t.Fatalf("Failed to build test image: %v", err)
393400
}
394401

0 commit comments

Comments
 (0)