Defer server file changes until guarded restart activation
Persist beta, promotion, drift, and rollback payloads until occupancy and restart-capacity checks pass. Preserve rollback snapshots and campaign ordering, and allow held rollback campaigns to resume safely. Fixes #28 Validation: 805 tests passed, Svelte checks clean, production build passed.
This commit is contained in:
@@ -645,7 +645,11 @@ describe('server creation map selection', () => {
|
||||
expect(await scanServerDrift(serverName)).toEqual([]);
|
||||
const mapPath = join(fixture.t5, serverName, 'configs', 'electric_cherry_map.cfg');
|
||||
await rm(mapPath);
|
||||
expect((await runDriftDeployment({ servers: [serverName] })).totalRestored).toBe(1);
|
||||
const repair = await runDriftDeployment({ servers: [serverName] });
|
||||
expect(repair.totalRestored).toBe(1);
|
||||
expect(existsSync(mapPath)).toBe(false);
|
||||
const { activateFiles } = await import('../helpers/staged-files.js');
|
||||
await activateFiles('campaign', repair.deploymentId!);
|
||||
expect(await readFile(mapPath, 'utf8')).toContain('set sv_maprotation "map zombie_cosmodrome"');
|
||||
expect(await scanServerDrift(serverName)).toEqual([]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user