test: update suites locked to the old direct process.env wiring for the adapter (E00-S04-T04)

This commit is contained in:
implementer
2026-08-30 04:17:22 +00:00
parent 20173a8241
commit 3214807c9d
4 changed files with 79 additions and 44 deletions
+15 -2
View File
@@ -73,8 +73,8 @@ function assertHealthEndpointSource(src) {
);
assert.match(
src,
/3000/,
'the server must default to the application port 3000 (Dockerfile EXPOSE / compose :3000)',
/server\.listen\(config\.port/,
'the server must bind the port from the validated configuration (config.port, E00-S04-T04)',
);
}
@@ -189,6 +189,19 @@ test('the endpoint reports a healthy application (committed health payload is {"
);
});
test('the application port default (3000) lives in the config adapter (E00-S04-T04)', () => {
// The server binds `config.port` (asserted above); the port default (3000,
// matching the Dockerfile EXPOSE / compose :3000) and the PORT override
// live in the config package's environment adapter — the single owner of
// process.env reads.
const envSrc = read('packages/config/src/env.ts');
assert.match(
envSrc,
/3000/,
'the config adapter must default the application port to 3000 (Dockerfile EXPOSE / compose :3000)',
);
});
test('an HTTP smoke test against the booted server succeeds for GET /health (200 + healthy body)', async (t) => {
if (!tsExecMode()) {
t.skip(