diff options
author | Shay <hillerys@element.io> | 2024-06-07 05:54:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-07 13:54:28 +0100 |
commit | ab94bce02cc6c268d8c3b693cbbbacd8ef926481 (patch) | |
tree | 369dbcbb397a59e29347aa19b09fb4749819def2 /tests/media/test_media_storage.py | |
parent | Add debug logging for when room keys are uploaded, including whether they are... (diff) | |
download | synapse-ab94bce02cc6c268d8c3b693cbbbacd8ef926481.tar.xz |
Support MSC3916 by adding a federation `/download` endpoint (#17172)
Diffstat (limited to 'tests/media/test_media_storage.py')
-rw-r--r-- | tests/media/test_media_storage.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/media/test_media_storage.py b/tests/media/test_media_storage.py index 46d20ce775..47a89e9c66 100644 --- a/tests/media/test_media_storage.py +++ b/tests/media/test_media_storage.py @@ -49,7 +49,10 @@ from synapse.logging.context import make_deferred_yieldable from synapse.media._base import FileInfo, ThumbnailInfo from synapse.media.filepath import MediaFilePaths from synapse.media.media_storage import MediaStorage, ReadableFileWrapper -from synapse.media.storage_provider import FileStorageProviderBackend +from synapse.media.storage_provider import ( + FileStorageProviderBackend, + StorageProviderWrapper, +) from synapse.media.thumbnailer import ThumbnailProvider from synapse.module_api import ModuleApi from synapse.module_api.callbacks.spamchecker_callbacks import load_legacy_spam_checkers @@ -78,7 +81,14 @@ class MediaStorageTests(unittest.HomeserverTestCase): hs.config.media.media_store_path = self.primary_base_path - storage_providers = [FileStorageProviderBackend(hs, self.secondary_base_path)] + storage_providers = [ + StorageProviderWrapper( + FileStorageProviderBackend(hs, self.secondary_base_path), + store_local=True, + store_remote=False, + store_synchronous=True, + ) + ] self.filepaths = MediaFilePaths(self.primary_base_path) self.media_storage = MediaStorage( |