Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Skip unit tests which require optional dependencies (#9031) | Richard van der Hoff | 2021-01-07 | 1 | -1/+27 |
| | | | If we are lacking an optional dependency, skip the tests that rely on it. | ||||
* | Implement a username picker for synapse (#8942) | Richard van der Hoff | 2020-12-18 | 1 | -1/+7 |
| | | | | | | | | | | | | | | The final part (for now) of my work to implement a username picker in synapse itself. The idea is that we allow `UsernameMappingProvider`s to return `localpart=None`, in which case, rather than redirecting the browser back to the client, we redirect to a username-picker resource, which allows the user to enter a username. We *then* complete the SSO flow (including doing the client permission checks). The static resources for the username picker itself (in https://github.com/matrix-org/synapse/tree/rav/username_picker/synapse/res/username_picker) are essentially lifted wholesale from https://github.com/matrix-org/matrix-synapse-saml-mozilla/tree/master/matrix_synapse_saml_mozilla/res. As the comment says, we might want to think about making them customisable, but that can be a follow-up. Fixes #8876. | ||||
* | lint | Richard van der Hoff | 2020-12-15 | 1 | -1/+1 |
| | |||||
* | Remove spurious "SynapseRequest" result from `make_request" | Richard van der Hoff | 2020-12-15 | 1 | -38/+6 |
| | | | | This was never used, so let's get rid of it. | ||||
* | fix up various test cases | Richard van der Hoff | 2020-12-02 | 1 | -6/+19 |
| | | | | | A few test cases were relying on being able to mount non-client servlets on the test resource. it's better to give them their own Resources. | ||||
* | Add `create_resource_dict` method to HomeserverTestCase | Richard van der Hoff | 2020-12-02 | 1 | -7/+21 |
| | | | | | | Rather than using a single JsonResource, construct a resource tree, as we do in the prod code, and allow testcases to add extra resources by overriding `create_resource_dict`. | ||||
* | Remove deprecated `/_matrix/client/*/admin` endpoints (#8785) | Dirk Klimpel | 2020-11-25 | 1 | -2/+2 |
| | | | These are now only available via `/_synapse/admin/v1`. | ||||
* | Remove redundant `HomeserverTestCase.render` | Richard van der Hoff | 2020-11-16 | 1 | -14/+0 |
| | |||||
* | Remove redundant calls to `render()` | Richard van der Hoff | 2020-11-16 | 1 | -8/+2 |
| | |||||
* | Make `make_request` actually render the request | Richard van der Hoff | 2020-11-16 | 1 | -0/+8 |
| | | | | | | remove the stubbing out of `request.process`, so that `requestReceived` also renders the request via the appropriate resource. Replace render() with a stub for now. | ||||
* | Merge branch 'develop' into rav/pass_site_to_make_request | Richard van der Hoff | 2020-11-16 | 1 | -11/+7 |
|\ | |||||
| * | Rename `create_test_json_resource` to `create_test_resource` (#8759) | Richard van der Hoff | 2020-11-16 | 1 | -11/+7 |
| | | | | | | | | | | The root resource isn't necessarily a JsonResource, so rename this method accordingly, and update a couple of test classes to use the method rather than directly manipulating self.resource. | ||||
* | | fix dict handling for make_request() | Richard van der Hoff | 2020-11-15 | 1 | -3/+0 |
| | | |||||
* | | pass a Site into make_request | Richard van der Hoff | 2020-11-15 | 1 | -0/+1 |
| | | |||||
* | | pass a Site into RestHelper | Richard van der Hoff | 2020-11-15 | 1 | -1/+1 |
|/ | |||||
* | Add `displayname` to Shared-Secret Registration for admins (#8722) | Dirk Klimpel | 2020-11-05 | 1 | -6/+13 |
| | | | Add `displayname` to Shared-Secret Registration for admins to `POST /_synapse/admin/v1/register` | ||||
* | Fail test cases if they fail to await all awaitables (#8690) | Patrick Cloke | 2020-10-30 | 1 | -1/+5 |
| | |||||
* | Don't instansiate Requester directly (#8614) | Erik Johnston | 2020-10-22 | 1 | -2/+2 |
| | |||||
* | Add basic tests for sync/pagination with vector clock tokens. (#8488) | Erik Johnston | 2020-10-14 | 1 | -1/+31 |
| | | | | | These are tests for #8439 | ||||
* | Fix message duplication if something goes wrong after persisting the event ↵ | Erik Johnston | 2020-10-13 | 1 | -2/+9 |
| | | | | | (#8476) Should fix #3365. | ||||
* | kill off `send_nonmember_event` | Richard van der Hoff | 2020-10-05 | 1 | -1/+3 |
| | | | | This is now redundant, and we can just call `handle_new_client_event` directly. | ||||
* | Add unit test for event persister sharding (#8433) | Erik Johnston | 2020-10-02 | 1 | -1/+1 |
| | |||||
* | Add checks for postgres sequence consistency (#8402) | Erik Johnston | 2020-09-28 | 1 | -1/+30 |
| | |||||
* | Create a mechanism for marking tests "logcontext clean" (#8399) | Richard van der Hoff | 2020-09-28 | 1 | -1/+14 |
| | |||||
* | Simplify super() calls to Python 3 syntax. (#8344) | Patrick Cloke | 2020-09-18 | 1 | -1/+1 |
| | | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py | ||||
* | Show a confirmation page during user password reset (#8004) | Andrew Morgan | 2020-09-10 | 1 | -0/+4 |
| | | | | | This PR adds a confirmation step to resetting your user password between clicking the link in your email and your password actually being reset. This is to better align our password reset flow with the industry standard of requiring a confirmation from the user after email validation. | ||||
* | Stop sub-classing object (#8249) | Patrick Cloke | 2020-09-04 | 1 | -1/+1 |
| | |||||
* | Add a shadow-banned flag to users. (#8092) | Patrick Cloke | 2020-08-14 | 1 | -2/+6 |
| | |||||
* | Convert synapse.api to async/await (#8031) | Patrick Cloke | 2020-08-06 | 1 | -14/+10 |
| | |||||
* | Rename database classes to make some sense (#8033) | Erik Johnston | 2020-08-05 | 1 | -3/+3 |
| | |||||
* | Convert the message handler to async/await. (#7884) | Patrick Cloke | 2020-07-22 | 1 | -1/+3 |
| | |||||
* | Create a ListenerConfig object (#7681) | Richard van der Hoff | 2020-06-16 | 1 | -1/+1 |
| | | | | | | | | | | 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 limit logic for EventsStream (#7358) | Richard van der Hoff | 2020-04-29 | 1 | -26/+4 |
| | | | | | | | | | | | | | | | | | | | * Factor out functions for injecting events into database I want to add some more flexibility to the tools for injecting events into the database, and I don't want to clutter up HomeserverTestCase with them, so let's factor them out to a new file. * Rework TestReplicationDataHandler This wasn't very easy to work with: the mock wrapping was largely superfluous, and it's useful to be able to inspect the received rows, and clear out the received list. * Fix AssertionErrors being thrown by EventsStream Part of the problem was that there was an off-by-one error in the assertion, but also the limit logic was too simple. Fix it all up and add some tests. | ||||
* | Set a logging context while running the bg updates | Richard van der Hoff | 2020-03-31 | 1 | -4/+7 |
| | | | | | This mostly just reduces the amount of "running from sentinel context" spam during unittest setup. | ||||
* | Merge pull request #7157 from matrix-org/rev.outbound_device_pokes_tests | Richard van der Hoff | 2020-03-30 | 1 | -5/+3 |
|\ | | | | | Add tests for outbound device pokes | ||||
| * | Add tests for outbound device pokes | Richard van der Hoff | 2020-03-27 | 1 | -0/+1 |
| | | |||||
| * | Remove spurious "name" parameter to `default_config` | Richard van der Hoff | 2020-03-24 | 1 | -5/+2 |
| | | | | | | | | | | this is never set to anything other than "test", and is a source of unnecessary boilerplate. | ||||
* | | Clean up some LoggingContext stuff (#7120) | Richard van der Hoff | 2020-03-24 | 1 | -4/+8 |
|/ | | | | | | | | | | | | | | | | | | | | | | | * Pull Sentinel out of LoggingContext ... and drop a few unnecessary references to it * Factor out LoggingContext.current_context move `current_context` and `set_context` out to top-level functions. Mostly this means that I can more easily trace what's actually referring to LoggingContext, but I think it's generally neater. * move copy-to-parent into `stop` this really just makes `start` and `stop` more symetric. It also means that it behaves correctly if you manually `set_log_context` rather than using the context manager. * Replace `LoggingContext.alive` with `finished` Turn `alive` into `finished` and make it a bit better defined. | ||||
* | Implement GET /_matrix/client/r0/rooms/{roomId}/aliases (#6939) | Richard van der Hoff | 2020-02-18 | 1 | -9/+19 |
| | | | | | per matrix-org/matrix-doc#2432 | ||||
* | s/get_room_version/get_room_version_id/ | Richard van der Hoff | 2020-01-31 | 1 | -1/+3 |
| | | | | | ... to make way for a forthcoming get_room_version which returns a RoomVersion object. | ||||
* | Fix `/events/:event_id` deprecated API. (#6731) | Erik Johnston | 2020-01-20 | 1 | -1/+1 |
| | |||||
* | Merge pull request #6629 from matrix-org/rav/kill_event_reference_hashes | Richard van der Hoff | 2020-01-06 | 1 | -5/+1 |
|\ | | | | | Remove a bunch of unused code from event creation | ||||
| * | Remove unused hashes and depths from create_event params | Richard van der Hoff | 2020-01-06 | 1 | -5/+1 |
| | | |||||
* | | Workaround for error when fetching notary's own key (#6620) | Richard van der Hoff | 2020-01-06 | 1 | -1/+10 |
|/ | | | | | | | | | | | | | | * Kill off redundant SynapseRequestFactory We already get the Site via the Channel, so there's no need for a dedicated RequestFactory: we can just use the right constructor. * Workaround for error when fetching notary's own key As a notary server, when we return our own keys, include all of our signing keys in verify_keys. This is a workaround for #6596. | ||||
* | Merge pull request #6484 from matrix-org/erikj/port_sync_handler | Erik Johnston | 2019-12-09 | 1 | -1/+6 |
|\ | | | | | Port SyncHandler to async/await | ||||
| * | Port SyncHandler to async/await | Erik Johnston | 2019-12-05 | 1 | -1/+6 |
| | | |||||
* | | Move background update handling out of store | Erik Johnston | 2019-12-05 | 1 | -4/+6 |
| | | |||||
* | | Move DB pool and helper functions into dedicated Database class | Erik Johnston | 2019-12-05 | 1 | -1/+1 |
|/ | |||||
* | Remove underscore from SQLBaseStore functions | Erik Johnston | 2019-12-04 | 1 | -1/+1 |
| | |||||
* | Implementation of MSC2314 (#6176) | Amber Brown | 2019-11-28 | 1 | -1/+67 |
| | |||||
* | Remove DelayedCall debugging from test runs (#5787) | Amber Brown | 2019-07-31 | 1 | -6/+0 |
| | |||||
* | More refactoring in `get_events_as_list` (#5707) | Richard van der Hoff | 2019-07-17 | 1 | -0/+1 |
| | | | | | | | | We can now use `_get_events_from_cache_or_db` rather than going right back to the database, which means that (a) we can benefit from caching, and (b) it opens the way forward to more extensive checks on the original event. We now always require the original event to exist before we will serve up a redaction. | ||||
* | Merge pull request #5589 from matrix-org/erikj/admin_exfiltrate_data | Erik Johnston | 2019-07-15 | 1 | -1/+1 |
|\ | | | | | Add basic function to get all data for a user out of synapse | ||||
| * | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2019-07-05 | 1 | -1/+1 |
| |\ | | | | | | | | | | erikj/admin_exfiltrate_data | ||||
| * | | Add basic function to get all data for a user out of synapse | Erik Johnston | 2019-07-02 | 1 | -1/+1 |
| | | | |||||
* | | | Add a mechanism for per-test configs (#5657) | Richard van der Hoff | 2019-07-12 | 1 | -1/+54 |
| |/ |/| | | | | | | | | | It's useful to be able to tweak the homeserver config to be used for each test. This PR adds a mechanism to do so. | ||||
* | | Move logging utilities out of the side drawer of util/ and into logging/ (#5606) | Amber Brown | 2019-07-04 | 1 | -1/+1 |
|/ | |||||
* | Make the http server handle coroutine-making REST servlets (#5475) | Amber Brown | 2019-06-29 | 1 | -8/+32 |
| | |||||
* | Pass config_dir_path and data_dir_path into Config.read_config. (#5522) | Richard van der Hoff | 2019-06-24 | 1 | -1/+1 |
| | | | | | | * Pull config_dir_path and data_dir_path calculation out of read_config_files * Pass config_dir_path and data_dir_path into read_config | ||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -10/+8 |
| | |||||
* | Expose statistics on extrems to prometheus (#5384) | Amber Brown | 2019-06-13 | 1 | -1/+60 |
| | |||||
* | Change password reset links to /_matrix. | Erik Johnston | 2019-06-11 | 1 | -0/+12 |
| | |||||
* | Migrate all tests to use the dict-based config format instead of hanging ↵ | Amber Brown | 2019-05-13 | 1 | -2/+10 |
| | | | | items off HomeserverConfig (#5171) | ||||
* | Run Black on the tests again (#5170) | Amber Brown | 2019-05-10 | 1 | -4/+9 |
| | |||||
* | Remove the requirement to authenticate for /admin/server_version. (#5122) | Richard van der Hoff | 2019-05-07 | 1 | -4/+18 |
| | | | | | | | | | This endpoint isn't much use for its intended purpose if you first need to get yourself an admin's auth token. I've restricted it to the `/_synapse/admin` path to make it a bit easier to lock down for those concerned about exposing this information. I don't imagine anyone is using it in anger currently. | ||||
* | Add config option to block users from looking up 3PIDs (#5010) | Brendan Abolivier | 2019-04-04 | 1 | -1/+1 |
| | |||||
* | Some more porting to HomeserverTestCase and remove old RESTHelper (#4913) | Amber Brown | 2019-03-22 | 1 | -0/+12 |
| | |||||
* | Migrate the user directory initial population to a background task (#4864) | Amber Brown | 2019-03-19 | 1 | -2/+2 |
| | |||||
* | Update test_typing to use HomeserverTestCase. (#4771) | Richard van der Hoff | 2019-03-04 | 1 | -2/+6 |
| | |||||
* | Enable configuring test log level via env var (#4506) | Richard van der Hoff | 2019-01-29 | 1 | -30/+7 |
| | | | | I got fed up with always adding '@unittest.DEBUG' every time I needed to debug a test. | ||||
* | Use native UPSERTs where possible (#4306) | Amber Brown | 2019-01-24 | 1 | -2/+10 |
| | |||||
* | create support user (#4141) | Neil Johnson | 2018-12-14 | 1 | -0/+1 |
| | | | | | | Allow for the creation of a support user. A support user can access the server, join rooms, interact with other users, but does not appear in the user directory nor does it contribute to monthly active user limits. | ||||
* | Patch defer.inlineCallbacks to check logcontexts in tests (#4205) | Richard van der Hoff | 2018-12-04 | 1 | -1/+3 |
| | |||||
* | Check logcontexts before and after each test (#4190) | Richard van der Hoff | 2018-11-27 | 1 | -2/+9 |
| | | | | | | | | | | | | * Add better diagnostics to flakey keyring test * fix interpolation fail * Check logcontexts before and after each test * update changelog * update changelog | ||||
* | Do a GC after each test to fix logcontext leaks (#4227) | Richard van der Hoff | 2018-11-27 | 1 | -2/+13 |
| | | | | | | | | | | * Some words about garbage collections and logcontexts * Do a GC after each test to fix logcontext leaks This feels like an awful hack, but... * changelog | ||||
* | Remove some boilerplate in tests (#4156) | Amber Brown | 2018-11-07 | 1 | -4/+6 |
| | |||||
* | Tests for user consent resource (#4140) | Amber Brown | 2018-11-06 | 1 | -2/+10 |
| | |||||
* | Write some tests for the email pusher (#4095) | Amber Brown | 2018-10-30 | 1 | -1/+8 |
| | |||||
* | Fix userconsent on Python 3 (#3938) | Amber Brown | 2018-10-02 | 1 | -1/+79 |
| | |||||
* | Replaced all occurences of e.message with str(e) | Schnuffle | 2018-09-27 | 1 | -1/+1 |
| | | | | Signed-off-by: Schnuffle <schnuffle@github.com> | ||||
* | Fix client IPs being broken on Python 3 (#3908) | Amber Brown | 2018-09-20 | 1 | -2/+5 |
| | |||||
* | Add a regression test for logging on failed connections (#3912) | Amber Brown | 2018-09-20 | 1 | -1/+2 |
| | |||||
* | Fix tests on postgresql (#3740) | Amber Brown | 2018-09-04 | 1 | -2/+5 |
| | |||||
* | Port storage/ to Python 3 (#3725) | Amber Brown | 2018-08-31 | 1 | -0/+11 |
| | |||||
* | Integrate presence from hotfixes (#3694) | Amber Brown | 2018-08-18 | 1 | -1/+7 |
| | |||||
* | Implement a new test baseclass to cut down on boilerplate (#3684) | Amber Brown | 2018-08-14 | 1 | -0/+144 |
| | |||||
* | Run black. | black | 2018-08-10 | 1 | -2/+5 |
| | |||||
* | Refactor REST API tests to use explicit reactors (#3351) | Amber Brown | 2018-07-17 | 1 | -0/+11 |
| | |||||
* | cleanups | Amber Brown | 2018-06-27 | 1 | -1/+4 |
| | |||||
* | handle federation not telling us about prev_events | Amber Brown | 2018-06-27 | 1 | -1/+1 |
| | |||||
* | Put python's logs into Trial when running unit tests (#3319) | Amber Brown | 2018-06-04 | 1 | -13/+27 |
| | |||||
* | enable twisted delayedcall debugging in UTs | Richard van der Hoff | 2018-01-09 | 1 | -1/+5 |
| | |||||
* | Slightly saner logging for unittests | Richard van der Hoff | 2016-07-25 | 1 | -4/+7 |
| | | | | | | | 1. Give the handler used for logging in unit tests a formatter, so that the output is slightly more meaningful 2. Log some synapse.storage stuff, because it's useful. | ||||
* | Fix flake8 warnings for tests | Mark Haines | 2016-02-19 | 1 | -3/+4 |
| | |||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 1 | -1/+1 |
| | |||||
* | Don't make @unittest.DEBUG print the huge amount of verbosity generated by ↵ | Paul "LeoNerd" Evans | 2015-01-12 | 1 | -0/+2 |
| | | | | the synapse.storage loggers | ||||
* | Added a useful unit test primitive for asserting object attributes | Paul "LeoNerd" Evans | 2014-09-17 | 1 | -0/+11 |
| | |||||
* | Define a CLOS-like 'around' modifier as a decorator, to neaten up the ↵ | Paul "LeoNerd" Evans | 2014-09-12 | 1 | -10/+23 |
| | | | | 'orig_*' noise of wrapping the setUp()/tearDown() methods | ||||
* | Add some docstrings | Paul "LeoNerd" Evans | 2014-09-12 | 1 | -0/+6 |
| | |||||
* | Additionally look first for a 'loglevel' attribute on the running test ↵ | Paul "LeoNerd" Evans | 2014-09-12 | 1 | -3/+7 |
| | | | | method, before the TestCase | ||||
* | Define a (class) decorator for easily setting a DEBUG logging level on a ↵ | Paul "LeoNerd" Evans | 2014-09-12 | 1 | -0/+5 |
| | | | | TestCase | ||||
* | Allow a TestCase to set a 'loglevel' attribute, which overrides the logging ↵ | Paul "LeoNerd" Evans | 2014-09-12 | 1 | -1/+22 |
| | | | | level while that testcase runs | ||||
* | Have all unit tests import from our own subclass of trial's unittest ↵ | Paul "LeoNerd" Evans | 2014-09-12 | 1 | -0/+30 |
TestCase; set up logging in ONE PLACE ONLY |