eslint: add no-shadow
This commit is contained in:
@@ -70,18 +70,18 @@ describe('backups', function () {
|
||||
});
|
||||
|
||||
it('can get backup site', async function () {
|
||||
const backupSite = await backupSites.get(defaultBackupSite.id);
|
||||
expect(backupSite.provider).to.be('filesystem');
|
||||
expect(backupSite.config.backupDir).to.be.ok(); // the test sets this to some tmp location
|
||||
expect(backupSite.format).to.be('tgz');
|
||||
expect(backupSite.encryption).to.be(null);
|
||||
expect(backupSite.contents).to.be(null);
|
||||
expect(backupSite.enableForUpdates).to.be(true);
|
||||
const result = await backupSites.get(defaultBackupSite.id);
|
||||
expect(result.provider).to.be('filesystem');
|
||||
expect(result.config.backupDir).to.be.ok(); // the test sets this to some tmp location
|
||||
expect(result.format).to.be('tgz');
|
||||
expect(result.encryption).to.be(null);
|
||||
expect(result.contents).to.be(null);
|
||||
expect(result.enableForUpdates).to.be(true);
|
||||
});
|
||||
|
||||
it('cannot get random backup site', async function () {
|
||||
const backupSite = await backupSites.get('random');
|
||||
expect(backupSite).to.be(null);
|
||||
const result = await backupSites.get('random');
|
||||
expect(result).to.be(null);
|
||||
});
|
||||
|
||||
it('can set backup config', async function () {
|
||||
@@ -100,8 +100,8 @@ describe('backups', function () {
|
||||
it('can set valid schedule', async function () {
|
||||
for (const pattern of [ '00 * * * * *', constants.CRON_PATTERN_NEVER ]) {
|
||||
await backupSites.setSchedule(defaultBackupSite, pattern, auditSource);
|
||||
const backupSite = await backupSites.get(defaultBackupSite.id);
|
||||
expect(backupSite.schedule).to.be(pattern);
|
||||
const result = await backupSites.get(defaultBackupSite.id);
|
||||
expect(result.schedule).to.be(pattern);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -113,15 +113,15 @@ describe('backups', function () {
|
||||
it('can set valid retention', async function () {
|
||||
for (const retention of [ { keepWithinSecs: 1 }, { keepYearly: 3 }, { keepMonthly: 14 } ]) {
|
||||
await backupSites.setRetention(defaultBackupSite, retention, auditSource);
|
||||
const backupSite = await backupSites.get(defaultBackupSite.id);
|
||||
expect(backupSite.retention).to.eql(retention);
|
||||
const result = await backupSites.get(defaultBackupSite.id);
|
||||
expect(result.retention).to.eql(retention);
|
||||
}
|
||||
});
|
||||
|
||||
it('cannot disable for update', async function () {
|
||||
await backupSites.setEnabledForUpdates(defaultBackupSite, false, auditSource);
|
||||
const backupSite = await backupSites.get(defaultBackupSite.id);
|
||||
expect(backupSite.enableForUpdates).to.eql(false);
|
||||
const result = await backupSites.get(defaultBackupSite.id);
|
||||
expect(result.enableForUpdates).to.eql(false);
|
||||
});
|
||||
|
||||
it('can delete all the backup sites', async function () {
|
||||
|
||||
Reference in New Issue
Block a user