Skip to content

Commit

Permalink
Improve room send tests (#1344)
Browse files Browse the repository at this point in the history
- Add origin_server_ts in make_join proto events as it's a required in
  both the [make_join](https://spec.matrix.org/v1.6/server-server-api/#get_matrixfederationv1make_joinroomiduserid)
  specification and all the PDU definitions in rooms v1-v10.
- Do not require event endpoint in user setup since the tests were
  migrated to [use sync](ab34a0e)
  • Loading branch information
gnieto authored Mar 30, 2023
1 parent 6842592 commit 0cbd088
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/SyTest/Federation/Room.pm
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ sub make_join_protoevent

auth_events => $auth_events,
content => { membership => "join" },
origin_server_ts => JSON::number( int( time() * 1000 )),
depth => JSON::number($self->next_depth),
prev_events => $prev_events,
room_id => $self->room_id,
Expand Down
4 changes: 2 additions & 2 deletions tests/50federation/31room-send.pl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
test "Inbound federation can receive events",
requires => [ $main::OUTBOUND_CLIENT,
local_user_and_room_fixtures(
user_opts => { with_events => 1 },
user_opts => { with_events => 0 },
),
federation_user_id_fixture() ],

Expand Down Expand Up @@ -98,7 +98,7 @@
test "Inbound federation can receive redacted events",
requires => [ $main::OUTBOUND_CLIENT,
local_user_and_room_fixtures(
user_opts => { with_events => 1 },
user_opts => { with_events => 0 },
),
federation_user_id_fixture() ],

Expand Down

0 comments on commit 0cbd088

Please sign in to comment.