Skip to content

Commit 4fb255c

Browse files
committed
Specify predecessor when manually upgrading room
Synapse looks for the connection in order to run the upgrade logic for remote room joins
1 parent e71b03e commit 4fb255c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/csapi/room_upgrade_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ func TestPushRuleRoomUpgrade(t *testing.T) {
9090
} else {
9191
newRoomID = alice.MustUpgradeRoom(t, roomID, "11")
9292
}
93+
t.Logf("Upgraded room %s to %s", roomID, newRoomID)
9394

9495
// Alice2 joins the new room
9596
alice2.MustJoinRoom(t, newRoomID, nil)
@@ -192,6 +193,7 @@ func TestPushRuleRoomUpgrade(t *testing.T) {
192193
} else {
193194
newRoomID = alice.MustUpgradeRoom(t, roomID, "11")
194195
}
196+
t.Logf("Upgraded room %s to %s", roomID, newRoomID)
195197

196198
// Ensure that the remote server sees the tombstone in the old room before
197199
// joining the new room (avoid races and the client woudn't know where to go
@@ -254,6 +256,12 @@ func mustManualUpgradeRoom(t *testing.T, c *client.CSAPI, oldRoomID string, newR
254256
newRoomID := c.MustCreateRoom(t, map[string]interface{}{
255257
"preset": "public_chat",
256258
"room_version": newRoomVersion,
259+
"creation_content": map[string]interface{}{
260+
// Specify the old room as the predecessor
261+
"predecessor": map[string]interface{}{
262+
"room_id": oldRoomID,
263+
},
264+
},
257265
})
258266

259267
// Send the m.room.tombstone event to the old room

0 commit comments

Comments
 (0)