@@ -65,10 +65,11 @@ func TestPushRuleRoomUpgrade(t *testing.T) {
6565
6666 // Upgrade the room
6767 newRoomID := alice .MustUpgradeRoom (t , roomID , "11" )
68+
6869 // Alice2 joins the new room
6970 alice2 .MustJoinRoom (t , newRoomID , nil )
7071
71- // Sanity check the push rules are in the expected state before the upgrade
72+ // Sanity check the push rules are in the expected state after the upgrade
7273 for _ , client := range []* client.CSAPI {alice , alice2 } {
7374 pushRulesAfter := client .GetAllPushRules (t )
7475 must .MatchGJSON (t , pushRulesAfter ,
@@ -88,14 +89,13 @@ func TestPushRuleRoomUpgrade(t *testing.T) {
8889 // When a homeserver becomes aware of a room upgrade (upgrade is done on remote
8990 // homeserver), it should copy over any existing push rules for all of its local users
9091 // from the old room to the new room at the time of upgrade.
91- t .Run ("joining a remote upgraded room carries over the push rules" , func (t * testing.T ) {
92+ t .Run ("joining a remote upgraded room carries over existing push rules" , func (t * testing.T ) {
9293 // Alice create a room
9394 roomID := alice .MustCreateRoom (t , map [string ]interface {}{
9495 "preset" : "public_chat" ,
9596 "room_version" : "10" ,
9697 })
9798 // Remote bob joins the room
98- // alice.MustInviteRoom(t, roomID, bob.UserID)
9999 bob .MustJoinRoom (t , roomID , []spec.ServerName {
100100 deployment .GetFullyQualifiedHomeserverName (t , "hs1" ),
101101 })
@@ -137,7 +137,16 @@ func TestPushRuleRoomUpgrade(t *testing.T) {
137137 // Upgrade the room
138138 newRoomID := alice .MustUpgradeRoom (t , roomID , "11" )
139139
140- // Sanity check the push rules are in the expected state before the upgrade
140+ // Remote bob joins the new room
141+ bob .MustJoinRoom (t , newRoomID , []spec.ServerName {
142+ deployment .GetFullyQualifiedHomeserverName (t , "hs1" ),
143+ })
144+ // Remote bob2 joins the new room
145+ bob2 .MustJoinRoom (t , newRoomID , []spec.ServerName {
146+ deployment .GetFullyQualifiedHomeserverName (t , "hs1" ),
147+ })
148+
149+ // Sanity check the push rules are in the expected state after the upgrade
141150 for _ , client := range []* client.CSAPI {bob , bob2 } {
142151 pushRulesAfter := client .GetAllPushRules (t )
143152 must .MatchGJSON (t , pushRulesAfter ,
0 commit comments