mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Configure PersistorManager to use the new S3 manager for 'aws-sdk'
This commit is contained in:
parent
2ca74fdf15
commit
a6d9d34fe3
2 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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 })
|
||||
|
|
Loading…
Reference in a new issue