summary refs log tree commit diff
path: root/tests/storage/test_client_ips.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Bump black from 22.12.0 to 23.1.0 (#15103)dependabot[bot]2023-02-221-1/+0
|
* Revert the deletion of stale devices due to performance issues. (#14662)reivilibre2022-12-121-3/+1
|
* Require types in tests.storage. (#14646)Patrick Cloke2022-12-091-28/+30
| | | | Adds missing type hints to `tests.storage` package and does not allow untyped definitions.
* Delete stale non-e2e devices for users, take 2 (#14595)Erik Johnston2022-12-091-1/+3
| | | | | This should help reduce the number of devices e.g. simple bots the repeatedly login rack up. We only delete non-e2e devices as they should be safe to delete, whereas if we delete e2e devices for a user we may accidentally break their ability to receive e2e keys for a message.
* Revert "POC delete stale non-e2e devices for users (#14038)" (#14582)David Robertson2022-11-291-3/+1
|
* POC delete stale non-e2e devices for users (#14038)Erik Johnston2022-11-291-1/+3
| | | | | | | | This should help reduce the number of devices e.g. simple bots the repeatedly login rack up. We only delete non-e2e devices as they should be safe to delete, whereas if we delete e2e devices for a user we may accidentally break their ability to receive e2e keys for a message. Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
* Remove `HomeServer.get_datastore()` (#12031)Richard van der Hoff2022-02-231-2/+2
| | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
* Test that `ClientIpStore` combines database and in-memory data correctly ↵Sean Quah2021-11-011-0/+206
| | | | (#11179)
* Fix inconsistent behavior of `get_last_client_by_ip` (#10970)Sean Quah2021-10-121-0/+43
| | | | | | | Make `get_last_client_by_ip` return the same dictionary structure regardless of whether the data has been persisted to the database. This change will allow slightly cleaner type hints to be applied later on.
* Don't drop user dir deltas when server leaves room (#10982)David Robertson2021-10-061-18/+3
| | | | | | | | | Fix a long-standing bug where a batch of user directory changes would be silently dropped if the server left a room early in the batch. * Pull out `wait_for_background_update` in tests Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Fix error in `get_user_ip_and_agents` when fetching from the database (#10968)Sean Quah2021-10-011-0/+34
|
* Flatten the synapse.rest.client package (#10600)reivilibre2021-08-171-1/+1
|
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Use mock from the stdlib. (#9772)Patrick Cloke2021-04-091-1/+1
|
* Remove old admin API `GET /_synapse/admin/v1/users/<user_id>` (#9401)Dirk Klimpel2021-04-091-2/+2
| | | | | | | | | | | | | Related: #8334 Deprecated in: #9429 - Synapse 1.28.0 (2021-02-25) `GET /_synapse/admin/v1/users/<user_id>` has no - unit tests - documentation API in v2 is available (#5925 - 12/2019, v1.7.0). API is misleading. It expects `user_id` and returns a list of all users. Signed-off-by: Dirk Klimpel dirk@klimpel.org
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-3/+21
| | | | | | | - 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 deprecated `/_matrix/client/*/admin` endpoints (#8785)Dirk Klimpel2020-11-251-1/+1
| | | These are now only available via `/_synapse/admin/v1`.
* Remove redundant calls to `render()`Richard van der Hoff2020-11-161-2/+1
|
* fixup testRichard van der Hoff2020-11-161-0/+1
|
* Add a `custom_headers` param to `make_request` (#8760)Richard van der Hoff2020-11-161-6/+7
| | | | Some tests want to set some custom HTTP request headers, so provide a way to do that before calling requestReceived().
* Tell Black to format code for Python 3.5 (#8664)Dan Callahan2020-10-271-1/+1
| | | | | | | | This allows trailing commas in multi-line arg lists. Minor, but we might as well keep our formatting current with regard to our minimum supported Python version. Signed-off-by: Dan Callahan <danc@element.io>
* Allow for make_awaitable's return value to be re-used. (#8261)Patrick Cloke2020-09-081-1/+1
|
* Convert stats and related calls to async/await (#8192)Patrick Cloke2020-08-271-3/+2
|
* Rename database classes to make some sense (#8033)Erik Johnston2020-08-051-13/+13
|
* Optimise some references to hs.config (#7546)Richard van der Hoff2020-05-221-8/+5
| | | These are surprisingly expensive, and we only really need to do them at startup.
* Fix race which caused deleted devices to reappear (#6514)Richard van der Hoff2019-12-101-20/+29
| | | | Stop the `update_client_ips` background job from recreating deleted devices.
* Move background update handling out of storeErik Johnston2019-12-051-7/+19
|
* Move DB pool and helper functions into dedicated Database classErik Johnston2019-12-051-6/+6
|
* Remove underscore from SQLBaseStore functionsErik Johnston2019-12-041-6/+6
|
* Test that pruning of old user IPs worksErik Johnston2019-09-241-0/+71
|
* Test background updateErik Johnston2019-09-231-0/+79
|
* Query devices table for last seen info.Erik Johnston2019-09-231-1/+0
| | | | | | | | This is a) simpler than querying user_ips directly and b) means we can purge older entries from user_ips without losing the required info. The storage functions now no longer return the access_token, since it was unused.
* Remove access-token support from RegistrationStore.register (#5642)Richard van der Hoff2019-07-101-3/+1
| | | | | The 'token' param is no longer used anywhere except the tests, so let's kill that off too.
* Run Black. (#5482)Amber Brown2019-06-201-10/+10
|
* Add admin api for sending server_notices (#5121)Richard van der Hoff2019-05-021-1/+4
|
* Move admin api impl to its own packageRichard van der Hoff2019-05-011-2/+3
| | | | It doesn't really belong under rest/client/v1 any more.
* Fix adding new rows instead of updating them if one of the key values is a ↵Amber Brown2019-01-091-0/+71
| | | | NULL in upserts. (#4369)
* Fix userconsent on Python 3 (#3938)Amber Brown2018-10-021-46/+2
|
* Fix client IPs being broken on Python 3 (#3908)Amber Brown2018-09-201-35/+167
|
* ensure guests never enter mau listNeil Johnson2018-09-061-3/+1
|
* Merge pull request #3670 from matrix-org/neilj/mau_sync_blockNeil Johnson2018-08-141-6/+6
|\ | | | | Block ability to read via sync if mau limit exceeded
| * rename _user_last_seen_monthly_activeNeil Johnson2018-08-091-6/+6
| |
* | Run tests under PostgreSQL (#3423)Amber Brown2018-08-131-1/+1
| |
* | Run black.black2018-08-101-8/+7
|/
* wip commit - tests failingNeil Johnson2018-08-031-6/+6
|
* fix (lots of) py3 test failuresNeil Johnson2018-08-031-1/+0
|
* fix py3 test failureNeil Johnson2018-08-031-0/+1
|
* insertion into monthly_active_usersNeil Johnson2018-08-021-3/+63
|
* Fix upErik Johnston2017-06-271-4/+1
|
* Fix up client ips to read from pending dataErik Johnston2017-06-271-4/+1
|
* GET /devices endpointRichard van der Hoff2016-07-201-0/+62
implement a GET /devices endpoint which lists all of the user's devices. It also returns the last IP where we saw that device, so there is some dancing to fish that out of the user_ips table.