Preserve shortage signals during global pause (Refs #137)
CI / checks (push) Successful in 4m47s

This commit is contained in:
2026-10-10 16:11:24 -04:00
parent 33da4482a6
commit ea932ec563
14 changed files with 154 additions and 26 deletions
+8 -3
View File
@@ -494,11 +494,16 @@ describe('historical metrics', () => {
readMetrics(1, at + 30_000).maps.find((map) => map.game === 't5' && map.map === 'Moon')!
.policy
).toMatchObject({ id: 'moon', mode: 'off', pausedReason: 'Operator paused.' });
const beforeGlobalPause = readMetrics(1, at + 30_000);
expect(beforeGlobalPause.autoscalingPaused).toBe(false);
db().prepare("INSERT INTO settings(key,value) VALUES ('autoscaling_paused','1')").run();
const globallyPaused = readMetrics(1, at + 30_000);
expect(globallyPaused.autoscalingPaused).toBe(true);
expect(globallyPaused.maps).toEqual(beforeGlobalPause.maps);
expect(
readMetrics(1, at + 30_000).maps.find((map) => map.game === 't5' && map.map === 'Moon')!
.policy?.pausedReason
).toBe('Autoscaling is globally paused. Operator paused.');
globallyPaused.maps.find((map) => map.game === 't5' && map.map === 'Moon')!.policy
?.pausedReason
).toBe('Operator paused.');
});
it('compares no-empty intervals with the current maximum, counting unknown lobbies in the lineup', async () => {