summary refs log tree commit diff
path: root/tests/storage/test_keys.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add final type hint to tests.unittest. (#15072)Patrick Cloke2023-02-141-28/+33
| | | | Adds a return type to HomeServerTestCase.make_homeserver and deal with any variables which are no longer Any.
* Require types in tests.storage. (#14646)Patrick Cloke2022-12-091-3/+6
| | | | Adds missing type hints to `tests.storage` package and does not allow untyped definitions.
* 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
* 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>`
* Type defintions for use in refactoring for redaction changes (#6803)Richard van der Hoff2020-01-301-4/+11
| | | | | | | | | | * Bump signedjson to 1.1 ... so that we can use the type definitions * Fix breakage caused by upgrade to signedjson 1.1 Thanks, @illicitonion...
* Store key validity time in the storage layerRichard van der Hoff2019-05-231-14/+30
| | | | | | | | This is a first step to checking that the key is valid at the required moment. The idea here is that, rather than passing VerifyKey objects in and out of the storage layer, we instead pass FetchKeyResult objects, which simply wrap the VerifyKey and add a valid_until_ts field.
* Rewrite store_server_verify_key to store several keys at once (#5234)Richard van der Hoff2019-05-231-14/+30
| | | | | Storing server keys hammered the database a bit. This replaces the implementation which stored a single key, with one which can do many updates at once.
* Rewrite Datastore.get_server_verify_keysRichard van der Hoff2019-04-091-3/+50
| | | | Rewrite this so that it doesn't hammer the database.
* Rewrite test_keys as a HomeserverTestCaseRichard van der Hoff2019-04-081-19/+15
|
* Fix flake8 (#4519)Amber Brown2019-01-301-3/+0
|
* Run tests under PostgreSQL (#3423)Amber Brown2018-08-131-1/+1
|
* Run black.black2018-08-101-7/+4
|
* run isortAmber Brown2018-07-091-0/+1
|
* Fix caching of remote servers' signature keysRichard van der Hoff2017-03-221-0/+53
The `@cached` decorator on `KeyStore._get_server_verify_key` was missing its `num_args` parameter, which meant that it was returning the wrong key for any server which had more than one recorded key. By way of a fix, change the default for `num_args` to be *all* arguments. To implement that, factor out a common base class for `CacheDescriptor` and `CacheListDescriptor`.