Cancel active provisioning jobs when rolling back betas
This commit is contained in:
@@ -175,7 +175,8 @@ describe('durable beta test plans', () => {
|
||||
const { getBeta } = await import('../../src/lib/server/fleet/beta.js');
|
||||
const { db } = await import('../../src/lib/server/db/index.js');
|
||||
expect(getBeta(id)?.state).toBe('rolled-back');
|
||||
expect(await readFile(scriptPath(names[0]), 'utf8')).toBe('main() {}');
|
||||
// Rollback now replaces the unhealthy restart in the same worker pass.
|
||||
expect(await readFile(scriptPath(names[0]), 'utf8')).toBe('original');
|
||||
expect(existsSync(scriptPath(names[1]))).toBe(false);
|
||||
expect(db().prepare("SELECT server, restart_state FROM deployment_servers").all()).toEqual([{ server: names[0], restart_state: 'pending' }]);
|
||||
const { sweep } = await import('../helpers/provisioning.js');
|
||||
|
||||
Reference in New Issue
Block a user