summary refs log tree commit diff
path: root/tests/storage/test_purge.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-05-31 13:17:50 +0100
committerGitHub <noreply@github.com>2022-05-31 12:17:50 +0000
commit1e453053cb12ff084fdcdc2f75c08ced274dff21 (patch)
tree4be06cbed3e79c7b107eebcf2ebd7b4e5c1427da /tests/storage/test_purge.py
parentRework stream token to stop caring about groups. (#12897) (diff)
downloadsynapse-1e453053cb12ff084fdcdc2f75c08ced274dff21.tar.xz
Rename storage classes (#12913)
Diffstat (limited to 'tests/storage/test_purge.py')
-rw-r--r--tests/storage/test_purge.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/storage/test_purge.py b/tests/storage/test_purge.py
index 08cc60237e..92cd0dfc05 100644
--- a/tests/storage/test_purge.py
+++ b/tests/storage/test_purge.py
@@ -31,7 +31,7 @@ class PurgeTests(HomeserverTestCase):
         self.room_id = self.helper.create_room_as(self.user_id)
 
         self.store = hs.get_datastores().main
-        self.storage = self.hs.get_storage()
+        self._storage_controllers = self.hs.get_storage_controllers()
 
     def test_purge_history(self):
         """
@@ -51,7 +51,9 @@ class PurgeTests(HomeserverTestCase):
 
         # Purge everything before this topological token
         self.get_success(
-            self.storage.purge_events.purge_history(self.room_id, token_str, True)
+            self._storage_controllers.purge_events.purge_history(
+                self.room_id, token_str, True
+            )
         )
 
         # 1-3 should fail and last will succeed, meaning that 1-3 are deleted
@@ -79,7 +81,9 @@ class PurgeTests(HomeserverTestCase):
 
         # Purge everything before this topological token
         f = self.get_failure(
-            self.storage.purge_events.purge_history(self.room_id, event, True),
+            self._storage_controllers.purge_events.purge_history(
+                self.room_id, event, True
+            ),
             SynapseError,
         )
         self.assertIn("greater than forward", f.value.args[0])
@@ -105,7 +109,9 @@ class PurgeTests(HomeserverTestCase):
         self.assertIsNotNone(create_event)
 
         # Purge everything before this topological token
-        self.get_success(self.storage.purge_events.purge_room(self.room_id))
+        self.get_success(
+            self._storage_controllers.purge_events.purge_room(self.room_id)
+        )
 
         # The events aren't found.
         self.store._invalidate_get_event_cache(create_event.event_id)