element-hq / element-hq/synapse
Test how the user directory handles remote users
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#11105](https://github.com/matrix-org/synapse/issues/11105).
---
All of the unit tests check the behaviour of the directory for local users. The implementation of the directory has many code paths that differ for local and remote users. We should have test coverage of these.
Fetching actual profiles over federation to properly fix #5677 will be involved and require mocking if we're going to make it a unit test. But it should be fairly straightforward to add tests that inspect the room-sharing tables for remote users. And thankfully, we don't have the (painful) business of directory exclusion to worry about for remote users.
Contributor guide
Research direction
Start by locating the existing unit tests for the user directory and inspect how they cover local users. Add cases for remote users that exercise the room-sharing table paths, including the differing local and remote behavior described in the issue. Done means the remote-user directory paths have unit-test coverage without requiring actual federation profile fetching.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100