From a954cc2cd43e017ccacd4455a1ecf5418d36fbec Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Mon, 10 Feb 2020 09:38:10 +0000 Subject: [PATCH] remove checks on m.room.aliases (#801) As matrix-org/synapse#6878 filters out m.room.aliases, we tweak the tests to no longer make assertions based on m.room.aliases state info from /sync. --- tests/30rooms/60version_upgrade.pl | 42 ++++++++++++++++-------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/tests/30rooms/60version_upgrade.pl b/tests/30rooms/60version_upgrade.pl index 51f5f37f9..0f1c8e0f5 100644 --- a/tests/30rooms/60version_upgrade.pl +++ b/tests/30rooms/60version_upgrade.pl @@ -697,19 +697,21 @@ sub upgrade_room_synced { $creator, $room_id, new_version => $TEST_NEW_VERSION, expected_event_counts => { - 'm.room.aliases' => 1, 'm.room.canonical_alias' => 1, + 'm.room.aliases' => 0, 'm.room.canonical_alias' => 1, }, ); })->then( sub { ( $new_room_id ) = @_; - matrix_get_room_state( - $creator, $room_id, - type=>'m.room.aliases', state_key=>$server_name, - ); - })->then( sub { - my ( $old_aliases ) = @_; - assert_deeply_eq( $old_aliases, {aliases => []}, "aliases on old room" ); + # m.room.aliases are filtered out until a better solution to mitigating abuse is is specced. + # + # matrix_get_room_state( + # $creator, $room_id, + # type=>'m.room.aliases', state_key=>$server_name, + # ); + # })->then( sub { + # my ( $old_aliases ) = @_; + # assert_deeply_eq( $old_aliases, {aliases => []}, "aliases on old room" ); matrix_get_room_state( $creator, $room_id, type=>'m.room.canonical_alias' ); })->then( sub { @@ -718,17 +720,19 @@ sub upgrade_room_synced { $old_canonical_alias, {}, "canonical_alias on old room", ); - matrix_get_room_state( - $creator, $new_room_id, - type=>'m.room.aliases', state_key=>$server_name, - ); - })->then( sub { - my ( $new_aliases ) = @_; - assert_deeply_eq( - [ sort( @{ $new_aliases->{aliases} } ) ], - [ sort( $room_alias_1, $room_alias_2 ) ], - "aliases on new room", - ); + # m.room.aliases are filtered out until a better solution to mitigating abuse is is specced. + # + # matrix_get_room_state( + # $creator, $new_room_id, + # type=>'m.room.aliases', state_key=>$server_name, + # ); + # })->then( sub { + # my ( $new_aliases ) = @_; + # assert_deeply_eq( + # [ sort( @{ $new_aliases->{aliases} } ) ], + # [ sort( $room_alias_1, $room_alias_2 ) ], + # "aliases on new room", + # ); matrix_get_room_state( $creator, $new_room_id, type=>'m.room.canonical_alias',