Conversation
Add integration tests for the --skip-pull flag covering: - Success when images are pre-downloaded (build-local first, then skip-pull) - Error when images are not available locally (non-existent tag) - Rejection of --skip-pull with --build-local (incompatible flags) Also adds skipPull option to AwfRunner in both run() and runWithSudo(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
Adds integration coverage for the CLI --skip-pull behavior by extending the integration test runner fixture and introducing a dedicated integration test suite.
Changes:
- Extend
AwfRunnerfixture to support askipPulloption that passes--skip-pullto the CLI. - Add
tests/integration/skip-pull.test.tscovering: cached-image success, missing-image failure, and--skip-pull+--build-localincompatibility.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/integration/skip-pull.test.ts | New integration tests validating --skip-pull behavior and error handling. |
| tests/fixtures/awf-runner.ts | Adds skipPull to fixture options and wires it into CLI arg construction. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // First, ensure images exist locally by building them | ||
| const buildResult = await runner.runWithSudo( | ||
| 'echo "images built"', | ||
| { | ||
| allowDomains: ['github.com'], | ||
| buildLocal: true, | ||
| logLevel: 'debug', | ||
| timeout: 120000, | ||
| } | ||
| ); |
There was a problem hiding this comment.
The “pre-download” step uses buildLocal: true, but --build-local builds Compose services without an image: name (Compose auto-names them), while the subsequent --skip-pull run uses GHCR image: ${registry}/…:${tag}. This means the first run does not actually populate the local cache for the images that --skip-pull will try to start, so this test can fail even though the intent is to validate cached-pull behavior.
To make this deterministic, prime the cache by running once with the same GHCR image settings (i.e., without --skip-pull and without --build-local) or explicitly docker pull the expected ${registry}/{squid,agent,api-proxy}:<tag> images before running with --skip-pull.
| // First, ensure images exist locally by building them | |
| const buildResult = await runner.runWithSudo( | |
| 'echo "images built"', | |
| { | |
| allowDomains: ['github.com'], | |
| buildLocal: true, | |
| logLevel: 'debug', | |
| timeout: 120000, | |
| } | |
| ); | |
| // First, ensure images exist locally by running once without --skip-pull or --build-local | |
| const buildResult = await runner.runWithSudo( | |
| 'echo "images built"', | |
| { | |
| allowDomains: ['github.com'], | |
| logLevel: 'debug', | |
| timeout: 120000, | |
| } | |
| ); |
|
Smoke Test Results — Run #22932163743 ✅ GitHub MCP — Last 2 merged PRs: Overall: PASS | Author:
|
|
Smoke Test Results — PASS
|
|
Merged PRs: "fix(squid): block direct IP connections that bypass domain filtering"; "feat: combine all build-test workflows into single build-test.md"
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Summary
skipPulloption toAwfRunnertest fixturetests/integration/skip-pull.test.tswith 3 integration tests:--skip-pullwith--build-localFixes #497
Test plan
🤖 Generated with Claude Code