[WIP] Refactor audit enricher tests to remove duplicate policy fixture builders#5370
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the audit enricher unit tests by centralizing duplicated policy/log-entry fixture builders into a shared test utility module, reducing repetition across the audit-enricher test suites.
Changes:
- Added
src/logs/audit-enricher.test-utils.tsto provide sharedmakeEntryandmakeManifesthelpers. - Updated
audit-enricher.test.tsandaudit-enricher-extra.test.tsto import the shared helpers and remove local duplicates.
Show a summary per file
| File | Description |
|---|---|
src/logs/audit-enricher.test.ts |
Removes local fixture builders and reuses shared makeEntry/makeManifest for consistent test setup. |
src/logs/audit-enricher.test-utils.ts |
Introduces shared test-only fixture builders for audit enricher tests. |
src/logs/audit-enricher-extra.test.ts |
Removes duplicated fixture builders and imports shared utilities to reduce maintenance overhead. |
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: 0
|
✅ Build Test Suite completed successfully! |
|
✅ Smoke Gemini completed. All facets verified. 💎 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed... |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓 |
|
✅ Smoke Claude passed |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
🔌 Smoke Services — All services reachable! ✅ |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
✨ New Files (1 files)
Coverage comparison generated by |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
Smoke Test: Copilot BYOK (Direct Mode) ✅ PASS
Mode: Direct BYOK (COPILOT_PROVIDER_API_KEY) via api-proxy → api.githubcopilot.com All systems operational.
|
🔥 Smoke Test ResultsPR: [WIP] Refactor audit enricher tests to remove duplicate policy fixture builders
Overall: FAIL — workflow template substitution did not occur for pre-step outputs.
|
|
Smoke test status: FAIL
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: Claude Engine Validation
Overall result: PASS
|
Smoke Test: API Proxy OpenTelemetry Tracing
All scenarios pass. OTEL integration is fully functional.
|
🔥 Smoke Test Results — Auth mode: PAT (COPILOT_GITHUB_TOKEN)
Overall: PASS cc
|
|
Running direct BYOK via api-proxy to Azure OpenAI (Foundry, o4-mini-aw) with Microsoft Entra authentication.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Chroot Version Comparison Results
Overall: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot environments.
|
Smoke Test Results — Services Connectivity
Overall: FAIL Services are not reachable from within the AWF sandbox on
|
Gemini Smoke Test Results
Overall status: PASS 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.
|
src/logs/audit-enricher.test-utils.tswith sharedmakeEntryandmakeManifestexportsaudit-enricher.test.tsto remove local duplicates and import from shared fileaudit-enricher-extra.test.tsto remove local duplicates and import from shared file