backups: remove noop backend
the noop backend is migrated into 0 sites config. when the updater code sees that there is no site to backup, it will just fail. user has to manually update with skipBackup flag.
This commit is contained in:
@@ -15,7 +15,6 @@ const backupSites = require('../backupsites.js'),
|
||||
filesystem = require('../storage/filesystem.js'),
|
||||
fs = require('node:fs'),
|
||||
gcs = require('../storage/gcs.js'),
|
||||
noop = require('../storage/noop.js'),
|
||||
os = require('node:os'),
|
||||
path = require('node:path'),
|
||||
s3 = require('../storage/s3.js'),
|
||||
@@ -150,40 +149,6 @@ describe('Storage', function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe('noop', function () {
|
||||
const gBackupConfig = {
|
||||
provider: 'noop',
|
||||
format: 'tgz'
|
||||
};
|
||||
|
||||
it('upload works', async function () {
|
||||
await noop.upload(gBackupConfig, 'file', {});
|
||||
});
|
||||
|
||||
it('can download file', async function () {
|
||||
const [error] = await safe(noop.download(gBackupConfig, 'file'));
|
||||
expect(error).to.be.an(Error);
|
||||
});
|
||||
|
||||
it('list dir contents of source dir', async function () {
|
||||
const result = await noop.listDir(gBackupConfig, 'sourceDir', 1000, null /* marker */);
|
||||
expect(result.marker).to.be(null);
|
||||
expect(result.entries).to.eql([]);
|
||||
});
|
||||
|
||||
it('can copy', async function () {
|
||||
await noop.copy(gBackupConfig, 'sourceFile', 'destFile', () => {});
|
||||
});
|
||||
|
||||
it('can remove file', async function () {
|
||||
await noop.remove(gBackupConfig, 'sourceFile');
|
||||
});
|
||||
|
||||
it('can remove empty dir', async function () {
|
||||
await noop.remove(gBackupConfig, 'sourceDir');
|
||||
});
|
||||
});
|
||||
|
||||
describe('s3', function () {
|
||||
const basePath = path.join(os.tmpdir(), 's3-backup-test-buckets');
|
||||
const backupConfig = {
|
||||
|
||||
Reference in New Issue
Block a user