- 
                Notifications
    You must be signed in to change notification settings 
- Fork 61
Add tests for MSC2716 and backfilling history #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f620354    to
    15ba451      
    Compare
  
    bd5b0b8    to
    dabdf5a      
    Compare
  
    Edits to make TARDIS work with Synapse while writing Complement tests for [MSC 2716](matrix-org/matrix-spec-proposals#2716). - matrix-org/synapse#9247 - matrix-org/complement#68
Before:
```
=== CONT  TestBackfillingHistory
    client.go:356: GET /_matrix/client/r0/sync => 200 OK (31.496008ms)
    client.go:356: POST /_matrix/client/unstable/org.matrix.msc2716/rooms/!GkmAGvcDmllsuqLgZA:hs1/batch_send => 200 OK (96.308307ms)
    client.go:356: POST /_matrix/client/r0/join/!GkmAGvcDmllsuqLgZA:hs1 => 200 OK (808.747133ms)
    client.go:356: GET /_matrix/client/r0/rooms/!GkmAGvcDmllsuqLgZA:hs1/messages => 200 OK (83.415512ms)
```
After:
```
=== CONT  TestBackfillingHistory
    client.go:357: GET hs1/_matrix/client/r0/sync => 200 OK (29.885812ms)
    client.go:357: POST hs1/_matrix/client/unstable/org.matrix.msc2716/rooms/!jbwgZJKNOedwNWRdop:hs1/batch_send => 200 OK (96.173807ms)
    client.go:357: POST hs2/_matrix/client/r0/join/!jbwgZJKNOedwNWRdop:hs1 => 200 OK (808.849665ms)
    client.go:357: GET hs2/_matrix/client/r0/rooms/!jbwgZJKNOedwNWRdop:hs1/messages => 200 OK (73.667196ms)
```
    95cf005    to
    425206d      
    Compare
  
    | @kegsay Can you give this another look? I don't want to keep adding to it when we were so close to merge. If you only want to approve up to a certain point, I can create another branch with all of the updates and we can merge at any commit. (trying to avoid the conflicts with juggling many branches) | 
| Yep sorry, I'll look at this again | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge this now.
| Thanks for the review @kegsay 🦓 Lots of great improvements! The functional  | 
…plement Spawned from #68
This PR is a follow-up to #74 which adds support for application services in Complement blueprints.
Add tests for MSC2716 and backfilling history
Dev notes
Previous code before functional client.go
Always show server logs even if the test passes: Change this line in
internal/docker/deployment.go#L34so it always passestrue:Create random string:
Make it possible to read the response body multiple times
Hook up Element (Matrix client) to the Complement server after a test runs
Because
PublishAllPorts: true,is set when the container is created, the homeserver is available to point a Matrix client against.defer deployment.Destroy(t)and replace withdefer time.Sleep(2 * time.Hour)to keep the homeserver running after the tests complete./scripts-dev/complement.sh)/Users/eric/Downloads/riot-complement-config.jsonand replace the port with the port you see fromdocker ps(docker ps -f name=complement_to just filter to the Complement containers){ "default_server_config": { "m.homeserver": { "base_url": "http://localhost:55449", "server_name": "my.complement.host" } }, "brand": "Element" }Access database in Complement test Docker container:
TODO
Add tests for healing state, https://github.com/matrix-org/matrix-doc/pull/2716/files#r559846587?prev_eventquery paramprev_event, the request fails with a 404."Can we support historical state events as the spec wants?PUT /_matrix/client/r0/rooms/{roomId}/state/{eventType}/{stateKey}/backfillessentially?user_idquery parameter to act as a virtual userhs2is already joined to the room, historical messages are added, scrollback shows the messageshs2is already joined to the room and has backfilled some historical messages. Then more historical messages are added and scrollback is able to show the new historical messages