Some checks failed
CI / Frontend Lint (pull_request) Failing after 7s
CI / Frontend Type Check (pull_request) Failing after 6s
CI / Frontend Build (pull_request) Failing after 6s
CI / Frontend E2E Tests (pull_request) Failing after 7s
CI / Orchestrator Build (pull_request) Failing after 5s
CI / Orchestrator Unit Tests (pull_request) Failing after 6s
CI / Orchestrator E2E (Testcontainers) (pull_request) Has been skipped
CI / Contracts Compile (pull_request) Failing after 5s
CI / Contracts Test (pull_request) Failing after 7s
Code Quality / SonarQube Analysis (pull_request) Failing after 21s
Code Quality / Code Quality Checks (pull_request) Failing after 5s
Security Scan / Dependency Vulnerability Scan (pull_request) Failing after 3s
Security Scan / OWASP ZAP Scan (pull_request) Failing after 3s
Closes gap-analysis v2 §7.8 (no E2E vs live Postgres / §10.8
(Testcontainers opt-in suite).
- tests/e2e/transactionLifecycle.e2e.test.ts — Postgres-backed E2E
suite via @testcontainers/postgresql. Brings up a real postgres:15
container, applies schema.sql (via pg simple-query protocol so $$
function bodies survive) + migrations 002/003/004, wires the
plans endpoints against it, and asserts:
* POST /api/plans persists and reads back
* eventBus.publish produces a hash-chained pair with verifyChain
returning ok
* idempotency_keys row insertion round-trips
- jest.e2e.config.js — dedicated config for tests/e2e/ with 120s
timeout; default jest.config.js now ignores /e2e/ so `npm test`
stays fast (<5s) and doesn't require Docker.
- package.json — adds 'npm run test:e2e' (sets RUN_E2E=1).
- devDependencies — testcontainers + @testcontainers/postgresql.
- Suite gates on `RUN_E2E=1`. Without it the describe block is
skipped, so CI environments without Docker don't fail; a guard
test asserts the skip invariant.
- .github/workflows/ci.yml — adds orchestrator-test (tsc + jest)
and orchestrator-e2e (gated on the 'run-e2e' PR label or any
push to main).
- Verification:
npx tsc --noEmit clean
npm test (unit) 7 suites, 80/80 passing
npm run test:e2e 1 suite, 4/4 passing (docker up)
19 lines
600 B
JavaScript
19 lines
600 B
JavaScript
/** @type {import('jest').Config} */
|
|
// E2E suite — runs the Testcontainers-backed integration tests
|
|
// under tests/e2e/. Separate from the default jest.config.js because
|
|
// it requires Docker and takes significantly longer.
|
|
//
|
|
// Usage:
|
|
// RUN_E2E=1 npx jest --config=jest.e2e.config.js
|
|
//
|
|
// CI wires this into a dedicated e2e workflow step so the normal
|
|
// unit-test suite stays <5s.
|
|
module.exports = {
|
|
preset: "ts-jest",
|
|
testEnvironment: "node",
|
|
roots: ["<rootDir>/tests/e2e"],
|
|
testMatch: ["**/*.e2e.test.ts"],
|
|
moduleFileExtensions: ["ts", "js", "json"],
|
|
testTimeout: 120_000,
|
|
};
|