backups: use a real targetId

This commit is contained in:
Girish Ramakrishnan
2025-07-25 07:44:25 +02:00
parent cfce39c1de
commit 276db17f0c
12 changed files with 81 additions and 62 deletions
+4 -2
View File
@@ -13,7 +13,7 @@ const archives = require('../archives.js'),
safe = require('safetydance');
describe('Archives', function () {
const { setup, cleanup, auditSource } = common;
const { setup, cleanup, auditSource, getDefaultBackupTarget } = common;
const appBackup = {
id: null,
@@ -27,11 +27,13 @@ describe('Archives', function () {
manifest: null,
preserveSecs: 0,
label: '',
appConfig: { loc: 'loc1' }
appConfig: { loc: 'loc1' },
targetId: null
};
before(async function () {
await setup();
appBackup.targetId = (await getDefaultBackupTarget()).id;
appBackup.id = await backups.add(appBackup);
});
after(cleanup);