Remove T6 Grief and Turned map selections

This commit is contained in:
2026-10-07 22:49:01 -04:00
parent 6146bef51d
commit a223180835
8 changed files with 30 additions and 15 deletions
+12
View File
@@ -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: '' };
+10
View File
@@ -3,12 +3,22 @@ import {
parseServerName,
selectedZombieMap,
t5ZombieMapBySlug,
zombieMapBySlug,
T5_ZOMBIE_MAPS,
T6_ZOMBIE_MAPS
} from '../../src/lib/server/fleet/map-aliases.js';
import { serverTitle } from '../../src/lib/ui/server-labels.js';
describe('T6 map identity', () => {
it.each([
['towngrief', 'zm_transit'], ['farmgrief', 'zm_transit'], ['busdepotgrief', 'zm_transit'],
['cellblock', 'zm_prison'], ['buriedgrief', 'zm_buried'], ['diner', 'zm_transit_dr'], ['buriedturned', 'zm_buried']
])('excludes %s without falling back to a supported variant of the same engine map', (slug, canonical) => {
expect(zombieMapBySlug('t6', slug)).toBeUndefined();
expect(selectedZombieMap('t6', canonical, slug)).toBeUndefined();
expect(parseServerName(`t6_zombie_${slug}_1`)?.mapCanonical).toBeNull();
});
it.each(T6_ZOMBIE_MAPS)('parses and labels $friendly without losing its variant', (map) => {
const name = `t6_zombie_${map.slug}_2`;
expect(parseServerName(name)).toMatchObject({ game: 't6', gameMode: 'zombie', mapCanonical: map.canonical, mapSlug: map.slug, lobby: 2 });
+2 -2
View File
@@ -79,14 +79,14 @@ describe('collection map summaries', () => {
retainedServers: ['t6_zombie_town_1'], removals: [
{ name: 't5_zombie_moon_1', reason: 'Outside collection' },
{ name: 't6_zombie_farm_1', reason: 'Outside collection' },
{ name: 't6_zombie_town_grief_1', reason: 'Outside collection' },
{ name: 't6_zombie_bus_depot_survival_1', reason: 'Outside collection' },
] });
expect(collectionMapGroups(plan)).toEqual([
{ game: 't5', label: 'Black Ops I', rows: [{ key: 't5:moon', mapName: 'Moon', target: 0, existing: 1, create: 0, remove: 1 }] },
{ game: 't6', label: 'Black Ops II', rows: [
{ key: 't6:town', mapName: 'Town Survival', target: 1, existing: 1, create: 0, remove: 0 },
{ key: 't6:farm', mapName: 'Farm Survival', target: 0, existing: 1, create: 0, remove: 1 },
{ key: 't6:towngrief', mapName: 'Town Grief', target: 0, existing: 1, create: 0, remove: 1 },
{ key: 't6:busdepot', mapName: 'Bus Depot Survival', target: 0, existing: 1, create: 0, remove: 1 },
] },
]);
});
+1 -1
View File
@@ -5,7 +5,7 @@ import { statusPresentation } from '../../src/lib/ui/status.js';
describe('operator-facing identities and states', () => {
it('preserves lobby numbers and distinguishes T6 variants sharing an engine map', () => {
expect(serverIdentity('t6_zombie_town_12')).toEqual({ map:'Town Survival', lobby:12, game:'Black Ops II' });
expect(serverIdentity('t6_zombie_towngrief_2')).toEqual({ map:'Town Grief', lobby:2, game:'Black Ops II' });
expect(serverIdentity('t6_zombie_farm_2')).toEqual({ map:'Farm Survival', lobby:2, game:'Black Ops II' });
expect(serverIdentity('custom-server')).toEqual({ map:'custom-server', lobby:null, game:'' });
});
it('keeps normal waiting neutral and distinguishes test success from promotion', () => {