Use stable MSC3030 /timestamp_to_event endpoints#559
Conversation
Synapse changes: matrix-org/synapse#14471
| @@ -118,7 +118,7 @@ func TestJumpToDateEndpoint(t *testing.T) { | |||
| // Make the `/timestamp_to_event` request from Bob's perspective (non room member) | |||
There was a problem hiding this comment.
Now that MSC3030 is merged and stable, do we also need to remove the +build msc3030 build tags from the top here and change these tests to Synapse only instead?
There was a problem hiding this comment.
👍 Copied from https://github.com/matrix-org/complement/pull/225/files
Added the Dendrite blacklist tags:
complement/tests/room_timestamp_to_event_test.go
Lines 1 to 2 in 9b2ba1a
| } else if timestampToEventRes.StatusCode != 404 || (timestampToEventRes.StatusCode == 404 && expectedEventId != "") { | ||
| t.Fatalf("mustCheckEventisReturnedForTime: /timestamp_to_event request failed with status=%d body=%s", timestampToEventRes.StatusCode, string(timestampToEventResBody)) |
There was a problem hiding this comment.
This is just a small fix to make easier to debug when the endpoint fails.
We now also throw when the endpoint throws a 404 but we were expecting an event.
…d for MSC2716 to share from instead
| return false | ||
| } | ||
|
|
||
| func fetchUntilMessagesResponseHas(t *testing.T, c *client.CSAPI, roomID string, check func(gjson.Result) bool) { |
There was a problem hiding this comment.
Moving this to tests/room_timestamp_to_event_test.go because we can't reference it from the msc2716 build tag when it's not included.
We don't build with msc2716 in the workers Complement environment (related matrix-org/synapse#14074). So now we can instead reference fetchUntilMessagesResponseHas from the file that isn't put behind a build tag.
| @@ -1126,16 +1126,6 @@ func TestImportHistoricalMessages(t *testing.T) { | |||
| }) | |||
There was a problem hiding this comment.
Looks like the Dendrite CI job is failing on main as well
…4471) Fix #14390 - Client API: `/_matrix/client/unstable/org.matrix.msc3030/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction>` -> `/_matrix/client/v1/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction>` - Federation API: `/_matrix/federation/unstable/org.matrix.msc3030/timestamp_to_event/<roomID>?ts=<timestamp>&dir=<direction>` -> `/_matrix/federation/v1/timestamp_to_event/<roomID>?ts=<timestamp>&dir=<direction>` Complement test changes: matrix-org/complement#559
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
…4471) Fix #14390 - Client API: `/_matrix/client/unstable/org.matrix.msc3030/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction>` -> `/_matrix/client/v1/rooms/<roomID>/timestamp_to_event?ts=<timestamp>&dir=<direction>` - Federation API: `/_matrix/federation/unstable/org.matrix.msc3030/timestamp_to_event/<roomID>?ts=<timestamp>&dir=<direction>` -> `/_matrix/federation/v1/timestamp_to_event/<roomID>?ts=<timestamp>&dir=<direction>` Complement test changes: matrix-org/complement#559
Use stable MSC3030
/timestamp_to_eventendpointsSynapse changes: matrix-org/synapse#14471