Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some comments explaining how a test works #1213

Merged
merged 1 commit into from
Mar 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion tests/48admin.pl
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,20 @@ sub await_purge_complete {
};

test "Can backfill purged history",
# we create three users:
# - an admin on server 0
# - a room creator on server 0
# - a second room member on server 1
#
# We then send a bunch of messages on both servers (and make sure that
# they are received at both ends).
#
# We then purge the events on server 0, and do an initialsync to check
# that the events were actually purged.
#
# Finally, we back-paginate on server 0. It should backfill the purged events
# from server 1 and return them to us.

requires => [ local_admin_fixture(), local_user_and_room_fixtures(),
remote_user_fixture(), qw( can_paginate_room_remotely ) ],
implementation_specific => ['synapse'],
Expand Down Expand Up @@ -266,7 +280,7 @@ sub await_purge_complete {
await_message_in_room( $remote_user, $room_id, $last_local_id )
)
})->then( sub {
# ... and half as the remote. This is useful to esnre that both local
# ... and half as the remote. This is useful to ensure that both local
# and remote events are handled correctly.
repeat( sub {
my $msgnum = $_[0];
Expand Down