feat: expose BI configuration readiness
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import app from './health.js';
|
||||
|
||||
test('separates liveness from configuration readiness', async () => {
|
||||
const liveness = await app.request('/');
|
||||
const readiness = await app.request('/readiness');
|
||||
const liveBody = await liveness.json();
|
||||
const readyBody = await readiness.json();
|
||||
|
||||
assert.equal(liveness.status, 200);
|
||||
assert.equal(liveBody.semantics, 'liveness');
|
||||
assert.equal(readyBody.semantics, 'configuration-only');
|
||||
assert.ok([200, 503].includes(readiness.status));
|
||||
});
|
||||
Reference in New Issue
Block a user