This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user