backups: add setup/teardown
1. add setup, teardown hooks 2. move the managed mount setup and teardown to filesystem backend 3. remove this vague storage.js we should convert storageApi into a real object, so we don't have to keep passing apiConfig around
This commit is contained in:
@@ -25,6 +25,10 @@ exports = module.exports = {
|
||||
remove,
|
||||
removeDir,
|
||||
|
||||
setup,
|
||||
teardown,
|
||||
cleanup,
|
||||
|
||||
testConfig,
|
||||
removePrivateFields,
|
||||
injectPrivateFields
|
||||
@@ -124,3 +128,19 @@ async function testConfig(apiConfig) {
|
||||
|
||||
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'testConfig is not implemented');
|
||||
}
|
||||
|
||||
async function setup(apiConfig) {
|
||||
assert.strictEqual(typeof apiConfig, 'object');
|
||||
|
||||
// Result: none - first callback argument error if config does not pass the test
|
||||
|
||||
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'setup is not implemented');
|
||||
}
|
||||
|
||||
async function teardown(apiConfig) {
|
||||
assert.strictEqual(typeof apiConfig, 'object');
|
||||
|
||||
// Result: none - first callback argument error if config does not pass the test
|
||||
|
||||
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'teardown is not implemented');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user