summary refs log tree commit diff
path: root/tests/storage/test_redaction.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Port `EventInternalMetadata` class to Rust (#16782)Erik Johnston2024-01-081-2/+3
| | | | | | | | | | | | | There are a couple of things we need to be careful of here: 1. The current python code does no validation when loading from the DB, so we need to be careful to ignore such errors (at least on jki.re there are some old events with internal metadata fields of the wrong type). 2. We want to be memory efficient, as we often have many hundreds of thousands of events in the cache at a time. --------- Co-authored-by: Quentin Gliech <quenting@element.io>
* Update license headersPatrick Cloke2023-11-211-10/+16
|
* Add a class UnpersistedEventContext to allow for the batching up of storing ↵Shay2023-02-091-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | state groups (#14675) * add class UnpersistedEventContext * modify create new client event to create unpersistedeventcontexts * persist event contexts after creation * fix tests to persist unpersisted event contexts * cleanup * misc lints + cleanup * changelog + fix comments * lints * fix batch insertion? * reduce redundant calculation * add unpersisted event classes * rework compute_event_context, split into function that returns unpersisted event context and then persists it * use calculate_context_info to create unpersisted event contexts * update typing * $%#^&* * black * fix comments and consolidate classes, use attr.s for class * requested changes * lint * requested changes * requested changes * refactor to be stupidly explicit * clearer renaming and flow * make partial state non-optional * update docstrings --------- Co-authored-by: Erik Johnston <erik@matrix.org>
* Require types in tests.storage. (#14646)Patrick Cloke2022-12-091-56/+69
| | | | Adds missing type hints to `tests.storage` package and does not allow untyped definitions.
* Rename storage classes (#12913)Erik Johnston2022-05-311-7/+7
|
* Remove redundant `get_success` calls in test code (#12346)Richard van der Hoff2022-04-011-42/+20
| | | There are a bunch of places we call get_success on an immediate value, which is unnecessary. Let's rip them out, and remove the redundant functionality in get_success and friends.
* Remove `HomeServer.get_datastore()` (#12031)Richard van der Hoff2022-02-231-1/+1
| | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
* Update the MSC3083 support to verify if joins are from an authorized server. ↵Patrick Cloke2021-07-261-3/+3
| | | | (#10254)
* Add endpoints for backfilling history (MSC2716) (#9247)Eric Eastwood2021-06-221-2/+11
| | | Work on https://github.com/matrix-org/matrix-doc/pull/2716
* 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>`
* Bugbear: Add Mutable Parameter fixes (#9682)Jonathan de Jong2021-04-081-2/+8
| | | | | | | Part of #9366 Adds in fixes for B006 and B008, both relating to mutable parameter lint errors. Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>
* Convert storage test cases to HomeserverTestCase. (#9736)Patrick Cloke2021-04-061-8/+4
|
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-6/+3
| | | | | | | - 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 redundant mockingRichard van der Hoff2020-12-021-8/+3
|
* Apply an IP range blacklist to push and key revocation requests. (#8821)Patrick Cloke2020-12-021-1/+1
| | | | | | | | | | | | 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).
* Simplify `_locally_reject_invite`Richard van der Hoff2020-10-131-2/+2
| | | | | Update `EventCreationHandler.create_event` to accept an auth_events param, and use it in `_locally_reject_invite` instead of reinventing the wheel.
* Add an assertion on prev_events in create_new_client_event (#8041)Richard van der Hoff2020-08-101-0/+4
| | | | | | I think this would have caught all the cases in https://github.com/matrix-org/synapse/issues/7642 - and I think a 500 makes more sense here than a 403
* Rename database classes to make some sense (#8033)Erik Johnston2020-08-051-2/+2
|
* Convert a synapse.events to async/await. (#7949)Patrick Cloke2020-07-271-1/+3
|
* Replace _event_dict_property with DictPropertyRichard van der Hoff2020-02-141-1/+1
| | | | | this amounts to the same thing, but replaces `_event_dict` with `_dict`, and removes some of the function layers generated by `property`.
* Add typing to SyncHandler (#6821)Erik Johnston2020-02-031-1/+4
| | | | Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Make 'event.redacts' never raise. (#6771)Erik Johnston2020-01-231-0/+35
| | | | | | There are quite a few places that we assume that a redaction event has a corresponding `redacts` key, which is not always the case. So lets cheekily make it so that event.redacts just returns None instead.
* Move DB pool and helper functions into dedicated Database classErik Johnston2019-12-051-2/+2
|
* Remove underscore from SQLBaseStore functionsErik Johnston2019-12-041-2/+2
|
* Use new EventPersistenceStoreErik Johnston2019-10-231-5/+6
|
* Fix fetching censored redactions from DBErik Johnston2019-10-021-0/+36
| | | | | | Fetching a censored redactions caused an exception due to the code expecting redactions to have a `redact` key, which redacted redactions don't have.
* Fix testErik Johnston2019-09-051-1/+3
|
* Make redaction retention period configurableErik Johnston2019-09-051-1/+3
|
* Censor redactions in DB after a monthErik Johnston2019-08-301-0/+71
|
* Handle loops in redaction eventsRichard van der Hoff2019-07-301-0/+70
|
* Convert RedactionTestCase to modern test style (#5768)Richard van der Hoff2019-07-261-36/+38
|
* Replace returnValue with return (#5736)Amber Brown2019-07-231-2/+2
|
* Run Black. (#5482)Amber Brown2019-06-201-2/+2
|
* Run Black on the tests again (#5170)Amber Brown2019-05-101-3/+3
|
* Collect room-version variations into one place (#4969)Richard van der Hoff2019-04-011-4/+5
| | | | Collect all the things that make room-versions different to one another into one place, so that it's easier to define new room versions.
* Fix testsErik Johnston2019-01-251-1/+4
|
* Revert "Require event format version to parse or create events"Erik Johnston2019-01-251-4/+1
|
* Fix testsErik Johnston2019-01-241-1/+4
|
* Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-08-201-35/+35
|\ | | | | | | erikj/refactor_state_handler
| * Run tests under PostgreSQL (#3423)Amber Brown2018-08-131-1/+1
| |
| * Run black.black2018-08-101-35/+35
| |
* | Fix testsErik Johnston2018-08-091-1/+3
|/
* run isortAmber Brown2018-07-091-4/+4
|
* s/_create_new_client_event/create_new_client_event/Erik Johnston2018-02-061-3/+3
|
* Updates testsErik Johnston2018-02-051-5/+4
|
* Remove some unused functions (#711)Mark Haines2016-04-081-47/+4
| | | | | | | | * Remove some unused functions * get_room_events_stream is only used in tests * is_exclusive_room might actually be something we want
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Remove more unused parametersDaniel Wagner-Hall2015-11-021-4/+0
|
* Factor out some of the common homeserver setup code into aMark Haines2015-02-111-12/+2
| | | | setup_test_homeserver function in utils.
* Replace hs.parse_roomid with RoomID.from_stringMark Haines2015-01-231-2/+2
|
* Replace hs.parse_userid with UserID.from_stringMark Haines2015-01-231-2/+3
|
* Kill off synapse.api.events.*Erik Johnston2014-12-161-13/+10
|
* Fix redaction testsErik Johnston2014-12-111-6/+8
|
* Fix redactions. Fix 'age' keyErik Johnston2014-12-111-3/+3
|
* Fix some testsErik Johnston2014-12-101-59/+49
|
* Fix redaction storage testErik Johnston2014-11-101-0/+4
|
* Fix redaction storage testErik Johnston2014-11-051-0/+12
|
* Rename redaction test case to something helpfulErik Johnston2014-09-251-1/+1
|
* More tests.Erik Johnston2014-09-251-1/+82
|
* Add test for redactionsErik Johnston2014-09-251-0/+181