Pool Plutonium keys by game for launches and autoscaling
This commit is contained in:
@@ -31,7 +31,7 @@ it('does not create schema mutations or host work when planning an empty map', a
|
||||
const { db } = await import('../../src/lib/server/db/index.js');
|
||||
const { scalingSnapshot } = await import('../../src/lib/server/autoscaling/snapshot.js');
|
||||
const { planScaling } = await import('../../src/lib/server/autoscaling/planner.js');
|
||||
db().prepare('INSERT INTO server_keys(server_id,pluto_key) VALUES(?,?)').run('t6_zombie_town_8', 'private-key');
|
||||
expect(planScaling(policy, scalingSnapshot(policy), Date.now()).server).toBe('t6_zombie_town_8');
|
||||
db().prepare("INSERT INTO server_keys(id,game,pluto_key) VALUES('key-8','t6','private-key')").run();
|
||||
expect(planScaling(policy, scalingSnapshot(policy), Date.now()).server).toBe('t6_zombie_town_1');
|
||||
expect(db().prepare('SELECT COUNT(*) AS n FROM server_deployments').get()).toEqual({ n: 0 });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user