fix(cutover): track direct detached listener pid
This commit is contained in:
@@ -45,9 +45,9 @@ async function fixture(name = 'cutover'): Promise<CutoverPlan> {
|
||||
drillEvidence: drill,
|
||||
drillEvidenceSha256: createHash('sha256').update(drillContent).digest('hex'),
|
||||
legacyPid: 41,
|
||||
legacyCommand: '/usr/bin/true legacy',
|
||||
legacyCommand: '/usr/local/bin/node /absolute/legacy/server.js',
|
||||
legacyIdentity: 'legacy-start-1',
|
||||
legacyStart: ['/usr/bin/true', 'legacy'],
|
||||
legacyStart: ['/usr/local/bin/node', '/absolute/legacy/server.js'],
|
||||
stateDir: join(root, 'state'),
|
||||
};
|
||||
}
|
||||
@@ -134,7 +134,7 @@ describe('cutover validation and reversible orchestration', () => {
|
||||
expect(await readFile(statePath, 'utf8')).not.toContain(token);
|
||||
expect(await rollback(plan, system)).toBe(43);
|
||||
expect(signals).toEqual([41, 42]);
|
||||
expect(starts[1]?.argv).toEqual(['/usr/bin/true', 'legacy']);
|
||||
expect(starts[1]?.argv).toEqual(['/usr/local/bin/node', '/absolute/legacy/server.js']);
|
||||
});
|
||||
|
||||
it('automatically restarts legacy if the gateway fails to own authenticated 8788', async () => {
|
||||
@@ -149,7 +149,7 @@ describe('cutover validation and reversible orchestration', () => {
|
||||
resolve(process.cwd(), 'node_modules/.pnpm/tsx@4.22.4/node_modules/tsx/dist/loader.mjs'),
|
||||
resolve(process.cwd(), 'apps/api/src/production-gateway-cli.ts'),
|
||||
],
|
||||
['/usr/bin/true', 'legacy'],
|
||||
['/usr/local/bin/node', '/absolute/legacy/server.js'],
|
||||
]);
|
||||
const state = JSON.parse(await readFile(join(plan.stateDir, 'cutover-state.json'), 'utf8')) as {
|
||||
phase: string;
|
||||
|
||||
Reference in New Issue
Block a user