mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 11:01:56 +02:00
Configure PersistorManager to use the new S3 manager for 'aws-sdk'
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user