summary refs log tree commit diff
path: root/tests/test_server.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add Synapse-Trace-Id to access-control-expose-headers header (#14974)Shay2023-03-201-0/+4
|
* Respond with proper error responses on unknown paths. (#14621)Patrick Cloke2022-12-081-1/+1
| | | | Returns a proper 404 with an errcode of M_RECOGNIZED for unknown endpoints per MSC3743.
* Implementation of HTTP 307 response for MSC3886 POST endpoint (#14018)Hugh Nimmo-Smith2022-10-181-27/+67
| | | | Co-authored-by: reivilibre <olivier@librepush.net> Co-authored-by: Andrew Morgan <andrewm@element.io>
* Remove configuration options for direct TCP replication. (#13647)Patrick Cloke2022-09-061-1/+1
| | | Removes the ability to configure legacy direct TCP replication. Workers now require Redis to run.
* Generalise the `@cancellable` annotation so it can be used on functions ↵reivilibre2022-08-311-1/+1
| | | | other than just servlet methods. (#13662)
* Use literals in place of `HTTPStatus` constants in tests (#13463)Dirk Klimpel2022-08-051-13/+13
|
* Rate limit joins per-room (#13276)David Robertson2022-07-191-1/+1
|
* Extra type annotations in `test_server` (#13124)David Robertson2022-06-281-37/+44
|
* Clean up the test code for client disconnections (#12929)Sean Quah2022-06-071-7/+7
| | | | | | | * Reword failure message about `await_result=False` * Use `reactor.advance()` instead of `reactor.pump()` * Raise `AssertionError`s ourselves * Un-instance method `_test_disconnect` * Replace `ThreadedMemoryReactorClock` with `MemoryReactorClock`
* Respect the `@cancellable` flag for `DirectServe{Html,Json}Resource`s (#12698)Sean Quah2022-05-111-2/+109
| | | | | | | | | | | | `DirectServeHtmlResource` and `DirectServeJsonResource` both inherit from `_AsyncResource`. These classes expect to be subclassed with `_async_render_*` methods. This commit has no effect on `JsonResource`, despite inheriting from `_AsyncResource`. `JsonResource` has its own `_async_render` override which will need to be updated separately. Signed-off-by: Sean Quah <seanq@element.io>
* Add reactor to `SynapseRequest` and fix up types. (#10868)Erik Johnston2021-09-241-11/+32
|
* Improved validation for received requests (#9817)Richard van der Hoff2021-04-231-0/+1
| | | | | | * Simplify `start_listening` callpath * Correctly check the size of uploaded files
* pass a reactor into SynapseSite (#9874)Richard van der Hoff2021-04-231-0/+1
|
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-1/+4
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Remove spurious "SynapseRequest" result from `make_request"Richard van der Hoff2020-12-151-12/+10
| | | | This was never used, so let's get rid of it.
* Skip redundant check on `request.args`Richard van der Hoff2020-12-151-2/+1
|
* Apply an IP range blacklist to push and key revocation requests. (#8821)Patrick Cloke2020-12-021-1/+4
| | | | | | | | | | | | Replaces the `federation_ip_range_blacklist` configuration setting with an `ip_range_blacklist` setting with wider scope. It now applies to: * Federation * Identity servers * Push notifications * Checking key validitity for third-party invite events The old `federation_ip_range_blacklist` setting is still honored if present, but with reduced scope (it only applies to federation and identity servers).
* Remove redundant calls to `render()`Richard van der Hoff2020-11-161-38/+11
|
* pass a Site into make_requestRichard van der Hoff2020-11-151-13/+27
|
* Iteratively encode JSON responses to avoid blocking the reactor. (#8013)Patrick Cloke2020-08-181-1/+0
|
* Implement handling of HTTP HEAD requests. (#7999)Patrick Cloke2020-08-031-3/+42
|
* Return an empty body for OPTIONS requests. (#7886)Patrick Cloke2020-07-241-6/+6
|
* Downgrade warning on client disconnect to INFO (#7928)Richard van der Hoff2020-07-241-58/+1
| | | | Clients disconnecting before we finish processing the request happens from time to time. We don't need to yell about it
* Merge different Resource implementation classes (#7732)Erik Johnston2020-07-031-9/+3
|
* Replace all remaining six usage with native Python 3 equivalents (#7704)Dagfinn Ilmari Mannsåker2020-06-161-2/+1
|
* Create a ListenerConfig object (#7681)Richard van der Hoff2020-06-161-2/+11
| | | | | | | | | | This ended up being a bit more invasive than I'd hoped for (not helped by generic_worker duplicating some of the code from homeserver), but hopefully it's an improvement. The idea is that, rather than storing unstructured `dict`s in the config for the listener configurations, we instead parse it into a structured `ListenerConfig` object.
* Fix missing CORS headers on OPTION responses (#7560)Erik Johnston2020-05-221-0/+28
| | | Broke in #7534.
* Return 200 OK for all OPTIONS requests (#7534)Patrick Cloke2020-05-221-0/+53
|
* Implement RedirectException (#6687)Richard van der Hoff2020-01-151-2/+77
| | | | | Allow REST endpoint implemnentations to raise a RedirectException, which will redirect the user's browser to a given location.
* Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2019-08-301-1/+1
| | | | | Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :)
* Fix servlet metric names (#5734)Jorik Schellekens2019-07-241-5/+16
| | | | | | | | | | * Fix servlet metric names Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * Remove redundant check * Cover all return paths
* Move logging utilities out of the side drawer of util/ and into logging/ (#5606)Amber Brown2019-07-041-1/+1
|
* Run Black. (#5482)Amber Brown2019-06-201-7/+7
|
* Use native UPSERTs where possible (#4306)Amber Brown2019-01-241-3/+9
|
* Fix some tests which leaked logcontextsRichard van der Hoff2018-11-191-1/+2
|
* Remove some boilerplate in tests (#4156)Amber Brown2018-11-071-5/+7
|
* Add a regression test for logging on failed connections (#3912)Amber Brown2018-09-201-2/+72
|
* Fix the testsAmber Brown2018-08-151-11/+6
|
* Run tests under PostgreSQL (#3423)Amber Brown2018-08-131-1/+1
|
* Test fixes for Python 3 (#3647)Amber Brown2018-08-091-7/+4
|
* Refactor REST API tests to use explicit reactors (#3351)Amber Brown2018-07-171-10/+12
|
* run isortAmber Brown2018-07-091-1/+2
|
* Better testing framework for homeserver-using things (#3446)Amber Brown2018-06-271-0/+128