[Test Coverage] deduplicate docker-manager.ts re-export tests#5341
Conversation
docker-manager.ts is a backwards-compatibility facade that re-exports the public API from host-env, config-writer, container-lifecycle, and container-cleanup. Because most test suites import directly from the source modules, the re-export lines in docker-manager.ts were never exercised (reported <20% coverage). Add docker-manager.test.ts following the same pattern established by host-iptables-reexports.test.ts: mock execa + logger, then assert identity equality between each docker-manager export and its source. This exercises all 11 re-export statements in the module and acts as a canary for accidental re-export removal or mis-wiring. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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 a Jest unit test to exercise src/docker-manager.ts’s barrel re-exports so they count toward coverage and act as a canary against accidental export changes.
Changes:
- Added
src/docker-manager.test.tsthat importsdocker-managerand the underlying modules and asserts identity equality (toBe) for all re-exported symbols. - Mocks
execaandloggerusing the shared test-helper factories to avoid side effects during module import.
Show a summary per file
| File | Description |
|---|---|
| src/docker-manager.test.ts | New test verifying docker-manager.ts re-exports by asserting exported symbol identity equality against source modules. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 1
| /** | ||
| * Verifies that docker-manager.ts correctly re-exports the runtime functions | ||
| * from the underlying modules it wraps (backwards-compatibility facade). | ||
| * | ||
| * The primary purpose of these tests is to exercise the re-export lines in |
|
⏳ Copilot review left inline comments. @github-actions[bot] To proceed:
|
|
@copilot address review feedback |
|
🔌 Smoke Services — All services reachable! ✅ |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓 |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
✅ Smoke Gemini completed. All facets verified. 💎 Testing safeoutputs |
|
✅ Build Test Suite completed successfully! |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
✅ Smoke Claude passed |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
Smoke Test: Claude Engine
Overall result: PASS
|
Smoke Test Results
Overall: FAIL — pre-computed smoke data ( PR: [Test Coverage] deduplicate docker-manager.ts re-export tests
|
|
perf(security-guard): prioritize security-relevant files in PR diff 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: API Proxy OpenTelemetry Tracing
All scenarios passed. OTEL tracing integration is functional.
|
|
✅ Smoke Test: Copilot BYOK (Direct Mode) — PASS
Running in direct BYOK mode: COPILOT_PROVIDER_API_KEY forwarded to api-proxy sidecar, placeholder injected into agent.
|
🔥 Smoke Test: Copilot PAT Auth — PASS
Overall: PASS · Auth mode: PAT (COPILOT_GITHUB_TOKEN) PR by
|
Chroot Smoke Test Results ❌
Result: FAILED — Python and Node.js versions differ between host and chroot. Label
|
Smoke Test: Gemini Engine Validation
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.
|
|
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test Results — Services Connectivity
Overall: FAIL
|
|
|
Summary
docker-manager.tsis a backwards-compatibility facade that re-exports the public API from four underlying modules (host-env,config-writer,container-lifecycle,container-cleanup). The repository already hadsrc/docker-manager-reexports.test.tscovering those re-exports, so the additional duplicate test file was unnecessary.Changes
Removed the redundant
src/docker-manager.test.tsand keptsrc/docker-manager-reexports.test.tsas the single source of truth for this contract.The remaining test continues to verify all 11 re-exported symbols and still acts as a canary: if any export is accidentally removed or redirected to the wrong source the test will fail immediately.
Test results
> Generated by Test Coverage Improver · 108.5 AIC · ⊞ 5.9K · ◷