diff --git a/services/filestore/app/js/PersistorManager.js b/services/filestore/app/js/PersistorManager.js index 8124d66101..cca0cf0f36 100644 --- a/services/filestore/app/js/PersistorManager.js +++ b/services/filestore/app/js/PersistorManager.js @@ -13,8 +13,6 @@ if (!settings.filestore.backend) { switch (settings.filestore.backend) { case 'aws-sdk': - module.exports = require('./AWSSDKPersistorManager') - break case 's3': module.exports = require('./S3PersistorManager') break diff --git a/services/filestore/test/unit/js/PersistorManagerTests.js b/services/filestore/test/unit/js/PersistorManagerTests.js index d8fd887265..0ecbb22078 100644 --- a/services/filestore/test/unit/js/PersistorManagerTests.js +++ b/services/filestore/test/unit/js/PersistorManagerTests.js @@ -43,6 +43,14 @@ describe('PersistorManager', function() { expect(PersistorManager.wrappedMethod()).to.equal('S3PersistorManager') }) + it("should implement the S3 wrapped method when 'aws-sdk' is configured", function() { + settings.filestore.backend = 'aws-sdk' + PersistorManager = SandboxedModule.require(modulePath, { requires }) + + expect(PersistorManager).to.respondTo('wrappedMethod') + expect(PersistorManager.wrappedMethod()).to.equal('S3PersistorManager') + }) + it('should implement the FS wrapped method when FS is configured', function() { settings.filestore.backend = 'fs' PersistorManager = SandboxedModule.require(modulePath, { requires })