Keep artifact list and beta queries free of file bytes

This commit is contained in:
2026-10-06 14:01:12 -04:00
parent 27be1abf41
commit ddb3db9537
21 changed files with 197 additions and 101 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ describe('beta revisions', () => {
it.each(['stale', 'identical', 'empty', 'unbundled', 'duplicate', 'closed', 'deleted', 'interrupted', 'activating'])('rejects %s updates without saving a revision', async reason => {
const x = await setup();
const upload = { scriptId: x.script.id, content: Buffer.from('changed') };
if (reason === 'identical') upload.content = Buffer.from(x.version.content);
if (reason === 'identical') upload.content = Buffer.from((await import('../../src/lib/server/fleet/scripts.js')).getVersionContent(x.version.id));
if (reason === 'empty') upload.content = Buffer.alloc(0);
if (reason === 'unbundled') upload.scriptId = 999;
if (reason === 'closed') x.db.prepare("UPDATE betas SET state = 'promoted' WHERE id = ?").run(x.betaId);