Prune legacy setup service scaffolding

This commit is contained in:
ejclaw
2026-04-08 07:38:06 +09:00
parent 0e016395c6
commit 67cb2fa5fc
13 changed files with 22 additions and 619 deletions

View File

@@ -82,31 +82,6 @@ describe('restartStackServices', () => {
).toThrow('restart:stack only supports Linux systemd services in this repo');
});
it('fails fast when legacy services are still present', () => {
const tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'ejclaw-restart-'));
tempRoots.push(tempRoot);
const execFileSyncImpl = vi.fn();
expect(() =>
restartStackServices(tempRoot, {
direct: true,
execFileSyncImpl,
runningAsRoot: false,
serviceManager: 'systemd',
serviceId: null,
legacyServiceIssues: [
{
name: 'ejclaw-codex',
status: 'stopped',
sources: ['systemd-system'],
},
],
}),
).toThrow('Legacy EJClaw multi-service install detected');
expect(execFileSyncImpl).not.toHaveBeenCalled();
});
it('falls back to direct restart when the oneshot unit is not installed for an external caller', () => {
const tempRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'ejclaw-restart-'));
tempRoots.push(tempRoot);