This commit is contained in:
@@ -188,6 +188,7 @@ describe('rebalance instance migrations', () => {
|
||||
content: Buffer.from('set sv_voice "1"\n')
|
||||
});
|
||||
const script = createScript({
|
||||
releaseVersion: '1.0.0',
|
||||
name: 'Deployed script',
|
||||
kind: 'script',
|
||||
targetRelPath: 'preserved.gsc',
|
||||
@@ -208,7 +209,9 @@ describe('rebalance instance migrations', () => {
|
||||
await acknowledge(job.deploymentId);
|
||||
const patched = uploadNewVersion(
|
||||
script.script.id,
|
||||
Buffer.from('confirmed patch after initial launch')
|
||||
Buffer.from('confirmed patch after initial launch'),
|
||||
undefined,
|
||||
'1.0.1'
|
||||
);
|
||||
const { recordScript } = await import('../../src/lib/server/fleet/inventory.js');
|
||||
recordScript(
|
||||
@@ -221,7 +224,9 @@ describe('rebalance instance migrations', () => {
|
||||
);
|
||||
const newest = uploadNewVersion(
|
||||
script.script.id,
|
||||
Buffer.from('new promotion must not be installed')
|
||||
Buffer.from('new promotion must not be installed'),
|
||||
undefined,
|
||||
'1.0.2'
|
||||
);
|
||||
db()
|
||||
.prepare('UPDATE scripts SET current_version_id=? WHERE id=?')
|
||||
@@ -3418,6 +3423,7 @@ describe('native provisioning cancellation and rollback', () => {
|
||||
const { reportHostOperation } = await import('../../src/lib/server/hosts/index.js');
|
||||
const { rollbackBeta } = await import('../../src/lib/server/fleet/beta.js');
|
||||
const { script, version } = createScript({
|
||||
releaseVersion: '1.0.0',
|
||||
name: 'Broken beta',
|
||||
kind: 'script',
|
||||
targetRelPath: 'beta.gsc',
|
||||
@@ -3774,6 +3780,7 @@ describe('cancelled native mutation bookkeeping', () => {
|
||||
const { reportHostOperation, getHostOperation } =
|
||||
await import('../../src/lib/server/hosts/index.js');
|
||||
const { script, version } = createScript({
|
||||
releaseVersion: '1.0.0',
|
||||
name: 'Revised beta',
|
||||
kind: 'script',
|
||||
targetRelPath: 'revision.gsc',
|
||||
@@ -3804,7 +3811,11 @@ describe('cancelled native mutation bookkeeping', () => {
|
||||
// A dispatched activation must settle before revision submission.
|
||||
await expect(
|
||||
reviseBeta(betaId, 1, [
|
||||
{ scriptId: script.id, content: Buffer.from('premature update') }
|
||||
{
|
||||
scriptId: script.id,
|
||||
releaseVersion: '1.0.1',
|
||||
content: Buffer.from('premature update')
|
||||
}
|
||||
])
|
||||
).rejects.toThrow();
|
||||
const activation = (await operationFor(restart.id))!;
|
||||
@@ -3823,7 +3834,11 @@ describe('cancelled native mutation bookkeeping', () => {
|
||||
}
|
||||
await activate(original);
|
||||
await reviseBeta(betaId, 1, [
|
||||
{ scriptId: script.id, content: Buffer.from('revision two') }
|
||||
{
|
||||
scriptId: script.id,
|
||||
releaseVersion: '1.0.1',
|
||||
content: Buffer.from('revision two')
|
||||
}
|
||||
]);
|
||||
await activate('revision one');
|
||||
const rollback = await rollbackBeta(betaId);
|
||||
|
||||
Reference in New Issue
Block a user