From 65f19346f0d72aa3e1026e43b89d16229f81ae98 Mon Sep 17 00:00:00 2001 From: Simon Detheridge Date: Thu, 19 Mar 2020 11:10:31 +0000 Subject: [PATCH] Fix fallback to custom s3 buckets --- services/filestore/app/js/MigrationPersistor.js | 2 +- services/filestore/test/acceptance/js/FilestoreTests.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/filestore/app/js/MigrationPersistor.js b/services/filestore/app/js/MigrationPersistor.js index 3ddc762922..d25ea84ce4 100644 --- a/services/filestore/app/js/MigrationPersistor.js +++ b/services/filestore/app/js/MigrationPersistor.js @@ -115,7 +115,7 @@ module.exports = function(primary, fallback) { } function _getFallbackBucket(bucket) { - return Settings.filestore.fallback.buckets[bucket] + return Settings.filestore.fallback.buckets[bucket] || bucket } function _wrapFallbackMethod(method) { diff --git a/services/filestore/test/acceptance/js/FilestoreTests.js b/services/filestore/test/acceptance/js/FilestoreTests.js index 272ffb52bd..668570e7cb 100644 --- a/services/filestore/test/acceptance/js/FilestoreTests.js +++ b/services/filestore/test/acceptance/js/FilestoreTests.js @@ -374,7 +374,7 @@ describe('Filestore', function() { }) }) - if (backend === 'S3Persistor') { + if (backend === 'S3Persistor' || backend === 'FallbackGcsToS3Persistor') { describe('with a file in a specific bucket', function() { let constantFileContent, fileId, fileUrl, bucketName