rename backups to backuptargets

This commit is contained in:
Girish Ramakrishnan
2025-07-24 18:46:21 +02:00
parent 5e456f378b
commit 931311f11f
20 changed files with 104 additions and 115 deletions
+3 -3
View File
@@ -6,7 +6,7 @@
'use strict';
const backups = require('../backups.js'),
const backupTargets = require('../backuptargets.js'),
BoxError = require('../boxerror.js'),
common = require('./common.js'),
execSync = require('child_process').execSync,
@@ -54,12 +54,12 @@ describe('Storage', function () {
it('fails to set backup storage for bad folder', async function () {
const tmp = Object.assign({}, gBackupConfig, { backupFolder: '/root/oof' });
const [error] = await safe(backups.setStorage(tmp));
const [error] = await safe(backupTargets.setStorage(tmp));
expect(error.reason).to.equal(BoxError.BAD_FIELD);
});
it('succeeds to set backup storage', async function () {
await backups.setStorage(gBackupConfig);
await backupTargets.setStorage(gBackupConfig);
expect(fs.existsSync(path.join(gBackupConfig.backupFolder, 'snapshot'))).to.be(true); // auto-created
});