Split docker-manager cleanup tests by concern#5357
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the Docker manager-related unit tests by splitting a previously mixed suite into three focused test files, making config-writing, cleanup, and diagnostics/audit preservation behaviors easier to find and run independently.
Changes:
- Added
src/docker-manager-write-configs.test.tsto coverwriteConfigs-related behavior. - Reduced
src/docker-manager-cleanup.test.tsto teardown-focused tests (plus cleanup-time diagnostics preservation). - Added
src/docker-manager-diagnostics.test.tsto covercollectDiagnosticLogsandpreserveIptablesAudit.
Show a summary per file
| File | Description |
|---|---|
| src/docker-manager-write-configs.test.ts | New test suite for writeConfigs behaviors (workdir creation, config outputs, permissions, proxy logs dir, chroot-home prep). |
| src/docker-manager-cleanup.test.ts | Trimmed to focus on cleanup() teardown and artifact-preservation behavior. |
| src/docker-manager-diagnostics.test.ts | New test suite for diagnostics log collection and iptables audit preservation behavior. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 4
| expect((stats.mode & 0o777).toString(8)).toBe('700'); | ||
| }); | ||
|
|
||
| it('should write config files with restricted permissions (0o600)', async () => { |
| const originalHome = process.env.HOME; | ||
| const originalSudoUser = process.env.SUDO_USER; | ||
| process.env.HOME = fakeHome; | ||
| delete process.env.SUDO_USER; | ||
|
|
|
@copilot address review feedback |
Done in the latest commit. Four issues addressed in
|
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓 No file at expected path for write/read test |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
✅ Smoke Gemini completed. All facets verified. 💎 |
|
✅ Build Test Suite completed successfully! |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
✅ Smoke Claude passed |
|
🔌 Smoke Services — All services reachable! ✅ |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
Smoke Test: Claude Engine Validation
Overall result: PASS
|
|
✅ Copilot BYOK Smoke Test: PASS
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) with api-proxy sidecar injection.
|
|
Smoke test
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.
|
🔥 Smoke Test Results — Auth mode: PAT (COPILOT_GITHUB_TOKEN)PR: Split docker-manager cleanup tests by concern
Overall: PASS
|
🔭 Smoke Test: API Proxy OpenTelemetry Tracing
All scenarios pass. ✅
|
🧪 Chroot Version Comparison Results
Overall: ❌ Not all runtimes match — Go matches, but Python and Node.js versions differ between host and chroot.
|
|
Smoke Test Results: MCP: ❌, Connectivity: ❌, File Writing: ✅, Bash Tool: ✅. Overall: 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 Results
Overall: ❌ FAIL — pre-step template variables were not substituted ( PR: Split docker-manager cleanup tests by concern | Author:
|
|
Smoke Test Results:
Status: FAIL Running in direct BYOK mode (AWF_AUTH_TYPE=github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) authenticated via Microsoft Entra
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
|
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) Overall PASS,description:Posting smoke test results comment
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL Services are not reachable from the runner.
|
src/docker-manager-cleanup.test.tshad grown into a mixed suite covering config generation, teardown, and diagnostics/audit preservation in one file. This change separates those independent concerns so each area is easier to locate, extend, and run in isolation.Config-writing tests
writeConfigscoverage intosrc/docker-manager-write-configs.test.tsCleanup tests
src/docker-manager-cleanup.test.tsto teardown-focused behaviorDiagnostics and audit tests
collectDiagnosticLogsandpreserveIptablesAuditcoverage intosrc/docker-manager-diagnostics.test.tsResulting layout