diff options
author | Erik Johnston <erik@matrix.org> | 2019-10-30 15:12:49 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-10-30 15:23:37 +0000 |
commit | 7c8c97e635811609c5a7ae4c0bb94e6573c30753 (patch) | |
tree | 60827c247fcdecab2225486a14a3122513fde86d /tests/storage/test_purge.py | |
parent | Merge pull request #6240 from matrix-org/erikj/split_out_persistence_store (diff) | |
download | synapse-7c8c97e635811609c5a7ae4c0bb94e6573c30753.tar.xz |
Split purge API into events vs state
Diffstat (limited to 'tests/storage/test_purge.py')
-rw-r--r-- | tests/storage/test_purge.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/storage/test_purge.py b/tests/storage/test_purge.py index f671599cb8..b9fafaa1a6 100644 --- a/tests/storage/test_purge.py +++ b/tests/storage/test_purge.py @@ -40,23 +40,24 @@ class PurgeTests(HomeserverTestCase): third = self.helper.send(self.room_id, body="test3") last = self.helper.send(self.room_id, body="test4") - storage = self.hs.get_datastore() + store = self.hs.get_datastore() + storage = self.hs.get_storage() # Get the topological token - event = storage.get_topological_token_for_event(last["event_id"]) + event = store.get_topological_token_for_event(last["event_id"]) self.pump() event = self.successResultOf(event) # Purge everything before this topological token - purge = storage.purge_history(self.room_id, event, True) + purge = storage.purge_events.purge_history(self.room_id, event, True) self.pump() self.assertEqual(self.successResultOf(purge), None) # Try and get the events - get_first = storage.get_event(first["event_id"]) - get_second = storage.get_event(second["event_id"]) - get_third = storage.get_event(third["event_id"]) - get_last = storage.get_event(last["event_id"]) + get_first = store.get_event(first["event_id"]) + get_second = store.get_event(second["event_id"]) + get_third = store.get_event(third["event_id"]) + get_last = store.get_event(last["event_id"]) self.pump() # 1-3 should fail and last will succeed, meaning that 1-3 are deleted |