matrix-org / matrix-org/sytest
Banned user tests differ for local and remote
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 81
- Forks
- 63
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 1
Description
I was looking at https://github.com/matrix-org/dendrite/issues/1331 and found the following.
In the ban test (https://github.com/matrix-org/sytest/blob/develop/tests/30rooms/07ban.pl) the [Remote banned user](https://github.com/matrix-org/sytest/blob/develop/tests/30rooms/07ban.pl#L82-L109) has the following check, which is not present on the [local user](https://github.com/matrix-org/sytest/blob/develop/tests/30rooms/07ban.pl#L19-L33):
```
->then( sub {
repeat_until_true {
matrix_get_room_state( $banned_user, $room_id,
type => "m.room.member",
state_key => $banned_user->user_id,
)->main::check_http_code(
403 => "ok",
200 => "redo",
);
};
})
```
If I read the [spec](https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-rooms-roomid-state-eventtype-statekey) correctly, the `matrix_get_room_state` should not return a 403 (`You aren't a member of the room and weren't previously a member of the room.`: the user was a member before being banned).
I guess those lines should be removed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review tests/30rooms/07ban.pl, comparing the local-user section at lines 19-33 with the remote-user check at lines 82-109. Read the linked Matrix client-server specification and run the ban test to confirm whether the differing state check is valid. Done means the test consistently reflects the specified behavior for both banned-user cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100