mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-10-01 08:28:23 -04:00
Rename storage classes (#12913)
This commit is contained in:
parent
e541bb9eed
commit
1e453053cb
53 changed files with 708 additions and 551 deletions
|
@ -2579,7 +2579,7 @@ class UserMembershipRestTestCase(unittest.HomeserverTestCase):
|
|||
other_user_tok = self.login("user", "pass")
|
||||
event_builder_factory = self.hs.get_event_builder_factory()
|
||||
event_creation_handler = self.hs.get_event_creation_handler()
|
||||
storage = self.hs.get_storage()
|
||||
storage_controllers = self.hs.get_storage_controllers()
|
||||
|
||||
# Create two rooms, one with a local user only and one with both a local
|
||||
# and remote user.
|
||||
|
@ -2604,7 +2604,7 @@ class UserMembershipRestTestCase(unittest.HomeserverTestCase):
|
|||
event_creation_handler.create_new_client_event(builder)
|
||||
)
|
||||
|
||||
self.get_success(storage.persistence.persist_event(event, context))
|
||||
self.get_success(storage_controllers.persistence.persist_event(event, context))
|
||||
|
||||
# Now get rooms
|
||||
url = "/_synapse/admin/v1/users/@joiner:remote_hs/joined_rooms"
|
||||
|
|
|
@ -130,7 +130,7 @@ class RetentionTestCase(unittest.HomeserverTestCase):
|
|||
We do this by setting a very long time between purge jobs.
|
||||
"""
|
||||
store = self.hs.get_datastores().main
|
||||
storage = self.hs.get_storage()
|
||||
storage_controllers = self.hs.get_storage_controllers()
|
||||
room_id = self.helper.create_room_as(self.user_id, tok=self.token)
|
||||
|
||||
# Send a first event, which should be filtered out at the end of the test.
|
||||
|
@ -155,7 +155,7 @@ class RetentionTestCase(unittest.HomeserverTestCase):
|
|||
)
|
||||
self.assertEqual(2, len(events), "events retrieved from database")
|
||||
filtered_events = self.get_success(
|
||||
filter_events_for_client(storage, self.user_id, events)
|
||||
filter_events_for_client(storage_controllers, self.user_id, events)
|
||||
)
|
||||
|
||||
# We should only get one event back.
|
||||
|
|
|
@ -88,7 +88,7 @@ class RoomBatchTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer) -> None:
|
||||
self.clock = clock
|
||||
self.storage = hs.get_storage()
|
||||
self._storage_controllers = hs.get_storage_controllers()
|
||||
|
||||
self.virtual_user_id, _ = self.register_appservice_user(
|
||||
"as_user_potato", self.appservice.token
|
||||
|
@ -168,7 +168,9 @@ class RoomBatchTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# Fetch the state_groups
|
||||
state_group_map = self.get_success(
|
||||
self.storage.state.get_state_groups_ids(room_id, historical_event_ids)
|
||||
self._storage_controllers.state.get_state_groups_ids(
|
||||
room_id, historical_event_ids
|
||||
)
|
||||
)
|
||||
|
||||
# We expect all of the historical events to be using the same state_group
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue