Wait for round two before adding spare lobbies
CI / checks (push) Successful in 7m20s

This commit is contained in:
2026-10-15 20:40:03 -04:00
parent 68616327ec
commit c1758cce25
11 changed files with 298 additions and 7 deletions
+11
View File
@@ -35,6 +35,7 @@ it('satisfies a T5 game-wide policy with the ten standard Zombies maps', () => {
identity: map.slug,
state: 'empty',
players: 0,
round: null,
observedAt: now,
source: 'rcon',
emptySince: 1,
@@ -84,6 +85,7 @@ it('satisfies a T6 game-wide policy with nine co-op maps and rejects Grief and T
identity: map.slug,
state: 'empty',
players: 0,
round: null,
observedAt: now,
source: 'rcon',
emptySince: 1,
@@ -132,6 +134,7 @@ it('applies targets and spare deficits independently to every map', () => {
identity: `${map.slug}:${n}`,
state: map.slug === 'town' ? 'occupied' : 'empty',
players: map.slug === 'town' ? 1 : 0,
round: map.slug === 'town' ? 2 : null,
observedAt: now,
source: 'rcon',
emptySince: 1,
@@ -154,6 +157,14 @@ it('applies targets and spare deficits independently to every map', () => {
});
snapshot.members = members.filter((m) => m.name !== 't6_zombie_town_2');
snapshot.reservedNames = snapshot.members.map((m) => m.name);
const town = snapshot.members.find((m) => m.name === 't6_zombie_town_1')!;
town.round = 1;
expect(planScaling(policy, snapshot, now)).toMatchObject({
action: 'destroy',
server: 't6_zombie_transit_2',
deficit: 1
});
town.round = 2;
expect(planScaling(policy, snapshot, now)).toMatchObject({
action: 'create',
server: 't6_zombie_town_2'