Remove T6 Grief and Turned map selections
This commit is contained in:
@@ -30,6 +30,18 @@ async function setup() {
|
||||
return { db, scaling };
|
||||
}
|
||||
|
||||
it('satisfies a T6 game-wide policy with nine co-op maps and rejects Grief and Turned selections', () => {
|
||||
const now = 2_000_000;
|
||||
const policy: ScalingPolicy = { ...scalingSettings(settings), id: 'policy', revision: 1, pausedReason: null, updatedAt: '' };
|
||||
const members: ScalingMember[] = maps.map(map => ({ name: `t6_zombie_${map.slug}_1`, mapSlug: map.slug,
|
||||
identity: map.slug, state: 'empty', players: 0, observedAt: now, source: 'rcon', emptySince: 1, blocker: null, operationId: null }));
|
||||
const snapshot = { members, reservedNames: members.map(m => m.name), keyPool: { total: 20, available: 11 }, blockers: [] };
|
||||
expect(planScaling(policy, snapshot, now)).toMatchObject({ action: 'wait', server: null, desired: 9, deficit: 0, empty: 9 });
|
||||
for (const mapSlug of ['towngrief', 'farmgrief', 'busdepotgrief', 'cellblock', 'buriedgrief', 'diner', 'buriedturned']) {
|
||||
expect(() => scalingSettings({ ...settings, mapSlug })).toThrow('supported game and map');
|
||||
}
|
||||
});
|
||||
|
||||
it('applies targets and spare deficits independently to every map', () => {
|
||||
const now = 2_000_000;
|
||||
const policy: ScalingPolicy = { ...scalingSettings(settings), id: 'policy', revision: 1, pausedReason: null, updatedAt: '' };
|
||||
|
||||
Reference in New Issue
Block a user