element-hq / element-hq/synapse
Make test utils reusable
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#14445](https://github.com/matrix-org/synapse/issues/14445).
---
There are test utils in the test directory which Fake Channels or sites, helps in building a synapse homeserver including correct urls and endpoints etc
This is really great but i can not reuse them for building plugins or other addons and so would need to copy them or rebuild them, which would again end in, somehow, copying them.
It would be great if there would be some kind of package like matrix-common which can be reused.
Because I needed something like that urgently, I started implementing it locally with an update system, released a package and uploaded it to pypi and there it is:
https://github.com/julianhille/matrix-synapse-testutils https://pypi.org/project/matrix-synapse-testutils/
Maybe this is of some use for some of you until there is an official package.
Contributor guide
Research direction
Start by reviewing the reusable utilities in the test directory, especially those that fake channels or sites and build a Synapse homeserver with URLs and endpoints. Define the package boundary and reuse approach, then compare it with the referenced matrix-synapse-testutils project; done means a decided, maintainable way for plugins and addons to reuse these utilities.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100