[Test Coverage] fix: dns-preresolution test fails on runners with github.com in /etc/hosts#6522
Conversation
The test was using 'github.com' and 'npmjs.org' which are injected into /etc/hosts on GitHub Actions runners. The hosts-file generator skips domains already present in /etc/hosts, so the pre-resolution mock was never called and the assertions on specific IPs failed. Replace with synthetic .internal domain names that cannot appear in any runner's /etc/hosts, making the test environment-independent. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Makes DNS pre-resolution tests independent of GitHub-hosted runner /etc/hosts entries.
Changes:
- Replaces public domains with synthetic
.internaltest domains. - Updates mocked DNS responses and assertions accordingly.
Show a summary per file
| File | Description |
|---|---|
src/services/agent-volumes-dns-preresolution.test.ts |
Uses environment-safe synthetic domains in pre-resolution tests. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Medium
|
📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Smoke Gemini completed. All facets verified. 💎 Smoke test completed with partial failures: MCP titles filtered, connectivity failed. |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
🔌 Smoke Services — Service connectivity failed to deliver outputs |
|
✅ Smoke Claude passed |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓 |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅ |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
✅ Contribution Check completed successfully! Contribution check complete: the PR follows the visible guidelines. It adds/updates a targeted test, keeps the change in the correct source tree, and the PR description clearly explains the failure and fix. No comment needed. |
|
✅ Build Test Suite completed successfully! |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed... |
|
🚀 Security Guard has started processing this pull request |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
|
EGRESS_RESULT allow=pass deny=pass ✅ Allowed domain ( Overall: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "example.com"See Network Configuration for more information.
|
🧪 Smoke Test: Copilot PAT Auth — PASS
Overall: PASS | Auth mode: PAT (COPILOT_GITHUB_TOKEN)
|
🔬 Smoke Test Results
Overall: PARTIAL — Core connectivity passing; pre-step data unavailable (template variables not expanded in agent context). cc
|
Smoke Test: Copilot BYOK (Direct) ✅ PASS✅ MCP connectivity (github-list_pull_requests) Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) via api-proxy → api.githubcopilot.com
|
Smoke Test Results
Overall status: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
Smoke Test: Claude Engine Validation
Overall Result: PASS
|
🔬 Smoke Test: API Proxy OpenTelemetry Tracing
All scenarios pass. ✅
|
Chroot Version Comparison Results
Overall: ❌ FAILED — Node.js version mismatch (host: v24.18.0, chroot: v22.23.1).
|
Smoke Test Results
Overall: FAIL —
|
|
Smoke test: PASS
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
|
GitHub MCP connectivity: ❌ (Resource integrity policy prevented reading PR data) Overall: FAIL
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
🔥 Smoke Test: Docker Sbx — PASS
Overall: ✅ PASS cc
|
Problem
The
agent-volumes-dns-preresolution.test.tstest was consistently failing on GitHub Actions runners because it usedgithub.comandnpmjs.orgas test domains. These domains are injected into the runner's/etc/hostsfile by GitHub.The
hosts-file.tsgenerator skips domains already present in/etc/hosts(to avoid duplicates), so theexeca.syncmock forgetentwas never invoked for these domains. This caused the assertions on specific resolved IPs to fail:Fix
Replace
github.com/npmjs.orgwith synthetic.internaldomain names (awf-test-alpha.internal,awf-test-beta.internal) that can never appear in a runner's/etc/hosts. This makes the test fully environment-independent.Verification