refactor: make service defs the setup SSOT
This commit is contained in:
@@ -19,6 +19,7 @@ import { getServiceDefs, type ServiceDef } from './service-defs.js';
|
||||
*/
|
||||
|
||||
const baseServiceDef: ServiceDef = {
|
||||
kind: 'primary',
|
||||
description: 'EJClaw Personal Assistant',
|
||||
launchdLabel: 'com.ejclaw',
|
||||
logName: 'ejclaw',
|
||||
@@ -126,6 +127,7 @@ describe('systemd unit generation', () => {
|
||||
const unit = buildSystemdUnit(
|
||||
{
|
||||
...baseServiceDef,
|
||||
kind: 'codex',
|
||||
environmentFile: '/srv/ejclaw/.env.codex',
|
||||
extraEnv: { ASSISTANT_NAME: 'codex' },
|
||||
logName: 'ejclaw-codex',
|
||||
@@ -184,6 +186,11 @@ describe('service definitions', () => {
|
||||
'ejclaw-codex',
|
||||
'ejclaw-review',
|
||||
]);
|
||||
expect(defs.map((def) => def.kind)).toEqual([
|
||||
'primary',
|
||||
'codex',
|
||||
'review',
|
||||
]);
|
||||
});
|
||||
|
||||
it('generates a oneshot stack restart unit', () => {
|
||||
|
||||
Reference in New Issue
Block a user