-
Notifications
You must be signed in to change notification settings - Fork 55
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
Room version 6 tests #869
Room version 6 tests #869
Conversation
We should probably add some sytests to the other added features as well. I'll see how hard that is. |
Also -- these tests are almost definitely in the wrong file now. :) I'll see if I can find a better one... |
|
@@ -16,8 +16,7 @@ use SyTest::Assertions qw( :all ); | |||
use URI::Escape qw( uri_escape ); | |||
|
|||
use constant SUPPORTED_ROOM_VERSIONS => [qw( | |||
1 2 3 4 5 | |||
org.matrix.msc2260 |
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.
This room version was previously removed from Synapse, it also seems a bit weird to bit unstable room versions in here.
@anoadragon453 Do you have any thoughts on where the JSON tests should go or if the current file is reasonable? |
it seems reasonable to me, fwiw (though I do tend to forget that |
@clokep Seems fine to me as well. |
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.
lgtm other than what I mentioned above.
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.
we should probably test what happens when we send a bad event to /_matrix/federation/v1/send
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.
probably also those sent to :
/_matrix/federation/vN/send_{join,leave}
/_matrix/federation/vN/invite
... and those sent in response to
/_matrix/federation/v1/backfill/{roomId}
/_matrix/federation/v1/get_missing_events/{roomId}
(I should say: happy for this to land as-is and the additional tests to end up in a different PR) |
@richvdh I think this is ready for another look. Hopefully the tests are reasonably self-explanatory, but let me know if additional comments should be added! |
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.
a few bits and bobs.
As a general theme: it's hard to tell what some of these tests are testing, and how they are doing it, from the short summary. I'd like to see some more comments describing exactly what they are testing, and also explaining how each test works. It's particularly useful to pick out which bits of the tests are boilerplate "setup" and where the interesting stuff is.
my ( $outbound_client, $inbound_server, $creator, $room_id, $user_id ) = @_; | ||
my $first_home_server = $creator->server_name; | ||
|
||
my $local_server_name = $outbound_client->server_name; |
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.
seems unused?
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.
It is used to set the origin
below in the send_join request.
@richvdh I think I've hit all your comments. Thanks for pointing out the additional fixtures! 👍 |
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.
lgtm!
…insic-release-v1.15.x * 'release-v1.15.0' of github.com:matrix-org/sytest: Use the standardized form for SSO login via user interactive auth. (#884) Add tests for room version 6. (#869) Add a retry_until_success around room join (#882) Have frontend proxy persist events when using redis (#870) Squashed commit of the following: Fix link to Synapse's contributing docs. (#879)
This adds some sytests for room version 6, mostly geared around the integer validation of MSC2540.
This requires matrix-org/synapse#7506
To Do:
Bad event sent to:
/_matrix/federation/v1/send
/_matrix/federation/vN/send_join
/_matrix/federation/vN/send_leave
/_matrix/federation/vN/invite
Bad event returned from:
/_matrix/federation/v1/backfill/{roomId}
/_matrix/federation/v1/get_missing_events/{roomId}