mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-09-09 15:31:56 +00:00
Remote membership tests for replication
This is because it now relies of the caches stream, which only works on postgres. We are trying to test with sqlite.
This commit is contained in:
parent
458b6f4733
commit
692daf6f54
@ -58,49 +58,6 @@ class SlavedEventStoreTestCase(BaseSlavedStoreTestCase):
|
||||
def tearDown(self):
|
||||
[unpatch() for unpatch in self.unpatches]
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_room_members(self):
|
||||
yield self.persist(type="m.room.create", key="", creator=USER_ID)
|
||||
yield self.replicate()
|
||||
yield self.check("get_rooms_for_user", (USER_ID,), [])
|
||||
yield self.check("get_users_in_room", (ROOM_ID,), [])
|
||||
|
||||
# Join the room.
|
||||
join = yield self.persist(type="m.room.member", key=USER_ID, membership="join")
|
||||
yield self.replicate()
|
||||
yield self.check("get_rooms_for_user", (USER_ID,), [RoomsForUser(
|
||||
room_id=ROOM_ID,
|
||||
sender=USER_ID,
|
||||
membership="join",
|
||||
event_id=join.event_id,
|
||||
stream_ordering=join.internal_metadata.stream_ordering,
|
||||
)])
|
||||
yield self.check("get_users_in_room", (ROOM_ID,), [USER_ID])
|
||||
|
||||
# Leave the room.
|
||||
yield self.persist(type="m.room.member", key=USER_ID, membership="leave")
|
||||
yield self.replicate()
|
||||
yield self.check("get_rooms_for_user", (USER_ID,), [])
|
||||
yield self.check("get_users_in_room", (ROOM_ID,), [])
|
||||
|
||||
# Add some other user to the room.
|
||||
join = yield self.persist(type="m.room.member", key=USER_ID_2, membership="join")
|
||||
yield self.replicate()
|
||||
yield self.check("get_rooms_for_user", (USER_ID_2,), [RoomsForUser(
|
||||
room_id=ROOM_ID,
|
||||
sender=USER_ID,
|
||||
membership="join",
|
||||
event_id=join.event_id,
|
||||
stream_ordering=join.internal_metadata.stream_ordering,
|
||||
)])
|
||||
yield self.check("get_users_in_room", (ROOM_ID,), [USER_ID_2])
|
||||
|
||||
yield self.persist(
|
||||
type="m.room.member", key=USER_ID, membership="join",
|
||||
)
|
||||
yield self.replicate()
|
||||
yield self.check("get_users_in_room", (ROOM_ID,), [USER_ID_2, USER_ID])
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_get_latest_event_ids_in_room(self):
|
||||
create = yield self.persist(type="m.room.create", key="", creator=USER_ID)
|
||||
|
Loading…
Reference in New Issue
Block a user