21 lines
762 B
JavaScript
21 lines
762 B
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { createRequire } from 'node:module';
|
|
|
|
const require = createRequire(import.meta.url);
|
|
const ecosystem = require('../runtime/ecosystem.config.cjs');
|
|
|
|
test('defines exactly four unique, bounded Gateway processes', () => {
|
|
assert.deepEqual(
|
|
ecosystem.apps.map((app) => app.name),
|
|
['sammo:gateway-api', 'sammo:gateway-frontend', 'sammo:gateway-orchestrator', 'sammo:release-controller'],
|
|
);
|
|
assert.equal(new Set(ecosystem.apps.map((app) => app.name)).size, 4);
|
|
for (const app of ecosystem.apps) {
|
|
assert.equal(app.autorestart, true);
|
|
assert.equal(app.max_restarts, 5);
|
|
assert.equal(app.min_uptime, 10_000);
|
|
assert.equal(app.restart_delay, 2_000);
|
|
}
|
|
});
|