summary refs log tree commit diff
path: root/tests/config (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add missing type hints to config base classes (#11377)Patrick Cloke2021-11-231-8/+14
|
* Remove legacy code related to deprecated ↵Shay2021-11-181-0/+9
| | | | | | | | | | | | | | | | | | | | | `trust_identity_server_for_password_resets` config flag (#11333) * remove code legacy code related to deprecated config flag "trust_identity_server_for_password_resets" from synapse/config/emailconfig.py * remove legacy code supporting depreciated config flag "trust_identity_server_for_password_resets" from synapse/config/registration.py * remove legacy code supporting depreciated config flag "trust_identity_server_for_password_resets" from synapse/handlers/identity.py * add tests to ensure config error is thrown and synapse refuses to start when depreciated config flag is found * add changelog * slightly change behavior to only check for deprecated flag if set to 'true' * Update changelog.d/11333.misc Co-authored-by: reivilibre <oliverw@matrix.org> Co-authored-by: reivilibre <oliverw@matrix.org>
* Fix synapse.config module "read" command (#11145)Jason Robinson2021-10-223-55/+104
| | | | | | | | | | `synapse.config.__main__` has the possibility to read a config item. This can be used to conveniently also validate the config is valid before trying to start Synapse. The "read" command broke in https://github.com/matrix-org/synapse/pull/10916 as it now requires passing in "server.server_name" for example. Also made the read command optional so one can just call this with just the confirm file reference and get a "Config parses OK" if things are ok. Signed-off-by: Jason Robinson <jasonr@matrix.org> Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
* Reset global cache state before cache tests. (#11036)Patrick Cloke2021-10-121-13/+11
| | | | | | This reverts #11019 and structures the code a bit more like it was before #10985. The global cache state must be reset before running the tests since other test cases might have configured caching (and thus touched the global state).
* Ensure each cache config test uses separate state. (#11019)Patrick Cloke2021-10-071-8/+12
| | | Hopefully this fixes these tests sometimes failing in CI.
* Require direct references to configuration variables. (#10985)Patrick Cloke2021-10-064-63/+58
| | | | | | This removes the magic allowing accessing configurable variables directly from the config object. It is now required that a specific configuration class is used (e.g. `config.foo` must be replaced with `config.server.foo`).
* Use direct references for configuration variables (part 7). (#10959)Patrick Cloke2021-10-041-3/+3
|
* Use direct references for configuration variables (part 4). (#10893)Patrick Cloke2021-09-232-6/+6
|
* Add config option to use non-default manhole password and keys (#10643)Azrenbeth2021-09-061-4/+4
|
* Allow using several custom template directories (#10587)Brendan Abolivier2021-08-171-3/+61
| | | Allow using several directories in read_templates.
* [pyupgrade] `tests/` (#10347)Jonathan de Jong2021-07-131-2/+2
|
* Remove support for ACME v1 (#10194)Brendan Abolivier2021-06-171-97/+0
| | | | | Fixes #9778 ACME v1 has been fully decommissioned for existing installs on June 1st 2021(see https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1/88430/27), so we can now safely remove it from Synapse.
* Remove redundant code to reload tls cert (#10054)Richard van der Hoff2021-05-271-2/+1
| | | | | we don't need to reload the tls cert if we don't have any tls listeners. Follow-up to #9280.
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-1411-11/+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>`
* Fix reported bugbear: too broad exception assertion (#9753)Andrew Morgan2021-04-061-2/+3
|
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-3/+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
* Convert blacklisted IPv4 addresses to compatible IPv6 addresses. (#9240)Patrick Cloke2021-02-031-1/+60
| | | Also add a few more IP ranges to the default blacklist.
* Fix validate_config on nested objects (#9054)Richard van der Hoff2021-01-081-0/+53
|
* Use the default templates when a custom template file cannot be found (#8037)Andrew Morgan2020-08-171-0/+82
| | | Fixes https://github.com/matrix-org/synapse/issues/6583
* Fix specifying cache factors via env vars with * in name. (#7580)Erik Johnston2020-05-271-0/+28
| | | | | This mostly applise to `*stateGroupCache*` and co. Broke in #6391.
* Don't apply cache factor to event cache. (#7578)Erik Johnston2020-05-271-0/+16
| | | | This is already correctly done when we instansiate the cache, but wasn't when it got reloaded (which always happens at least once on startup).
* Fix new flake8 errors (#7470)Erik Johnston2020-05-121-1/+1
|
* Allow configuration of Synapse's cache without using synctl or environment ↵Amber Brown2020-05-111-0/+127
| | | | variables (#6391)
* Improve database configuration docs (#6988)Richard van der Hoff2020-03-201-20/+2
| | | | | Attempts to clarify the sample config for databases, and add some stuff about tcp keepalives to `postgres.md`.
* Share SSL contexts for non-federation requests (#7094)Richard van der Hoff2020-03-171-10/+19
| | | | | | | Extends #5794 etc to the SimpleHttpClient so that it also applies to non-federation requests. Fixes #7092.
* Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Patrick Cloke2020-02-211-1/+1
| | | | Ensure good comprehension hygiene using flake8-comprehensions.
* Refactor HomeserverConfig so it can be typechecked (#6137)Amber Brown2019-10-101-9/+16
|
* Fix well-known lookups with the federation certificate whitelist (#5997)Amber Brown2019-09-141-0/+40
|
* Servers-known-about statistic (#5981)Amber Brown2019-09-072-23/+36
|
* Config templating (#5900)Jorik Schellekens2019-08-283-1/+196
| | | | | | | | | | | | Template config files * Imagine a system composed entirely of x, y, z etc and the basic operations.. Wait George, why XOR? Why not just neq? George: Eh, I didn't think of that.. Co-Authored-By: Erik Johnston <erik@matrix.org>
* Fixes to the federation rate limiter (#5621)Richard van der Hoff2019-07-051-0/+40
| | | | | | | - Put the default window_size back to 1000ms (broken by #5181) - Make the `rc_federation` config actually do something - fix an off-by-one error in the 'concurrent' limit - Avoid creating an unused `_PerHostRatelimiter` object for every single incoming request
* Update the TLS cipher string and provide configurability for TLS on outgoing ↵Amber Brown2019-06-281-1/+114
| | | | federation (#5550)
* Pass config_dir_path and data_dir_path into Config.read_config. (#5522)Richard van der Hoff2019-06-241-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 Brown2019-06-202-5/+5
|
* Run Black on the tests again (#5170)Amber Brown2019-05-104-93/+105
|
* Neilj/fix threepid auth check (with tests) (#4474)Neil Johnson2019-04-011-0/+32
| | | test threepid checking
* Use yaml safe_loadErik Johnston2019-03-222-3/+3
|
* Clarify and fix behaviour when there are multiple aliasesErik Johnston2019-02-141-0/+6
|
* Add configurable room list publishing rulesErik Johnston2019-02-141-0/+73
| | | | | This allows specifying who and what is allowed to be published onto the public room list
* Fix error when loading cert if tls is disabled (#4618)Richard van der Hoff2019-02-121-1/+1
| | | | | | If TLS is disabled, it should not be an error if no cert is given. Fixes #4554.
* fix testsRichard van der Hoff2019-02-111-2/+6
|
* Do not generate self-signed TLS certificates by default. (#4509)Amber Brown2019-01-292-2/+75
|
* Require ECDH key exchange & remove dh_params (#4429)Amber Brown2019-01-221-1/+0
| | | * remove dh_params and set better cipher string
* Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-10-251-1/+1
|\ | | | | | | erikj/alias_disallow_list
| * Fix a number of flake8 errorsRichard van der Hoff2018-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Broadly three things here: * disable W504 which seems a bit whacko * remove a bunch of `as e` expressions from exception handlers that don't use them * use `r""` for strings which include backslashes Also, we don't use pep8 any more, so we can get rid of the duplicate config there.
* | Use allow/denyErik Johnston2018-10-251-4/+4
| |
* | Add tests for config generationErik Johnston2018-10-191-0/+67
|/
* Run black.black2018-08-102-34/+42
|
* run isortAmber Brown2018-07-092-0/+4
|
* Make tests py3 compatibleAdrian Tschira2018-04-161-1/+1
| | | | | | | | | | | This is a mixed commit that fixes various small issues * print parentheses * 01 is invalid syntax (it was octal in py2) * [x for i in 1, 2] is invalid syntax * six moves Signed-off-by: Adrian Tschira <nota@notafile.com>
* Fix broken config UTsRichard van der Hoff2018-01-091-1/+16
| | | | | https://github.com/matrix-org/synapse/pull/2755 broke log-config generation, which in turn broke the unit tests.
* Add function to load config without generating itMark Haines2016-06-092-3/+21
| | | | | | | | | | | | | | | | Renames ``load_config`` to ``load_or_generate_config`` Adds a method called ``load_config`` that just loads the config. The main synapse.app.homeserver will continue to use ``load_or_generate_config`` to retain backwards compat. However new worker processes can use ``load_config`` to load the config avoiding some of the cruft needed to generate the config. As the new ``load_config`` method is expected to be used by new configs it removes support for the legacy commandline overrides that ``load_or_generate_config`` supports
* Check that the disable_registration config key is handled correctlyMark Haines2016-02-221-0/+21
|
* TypoErik Johnston2016-02-091-1/+1
|
* Fix testErik Johnston2016-02-091-3/+4
|
* Error if macaroon key is missing from configDaniel Wagner-Hall2016-02-053-0/+141
Currently we store all access tokens in the DB, and fall back to that check if we can't validate the macaroon, so our fallback works here, but for guests, their macaroons don't get persisted, so we don't get to find them in the database. Each restart, we generate a new ephemeral key, so guests lose access after each server restart. I tried to fix up the config stuff to be less insane, but gave up, so instead I bolt on yet another piece of custom one-off insanity. Also, add some basic tests for config generation and loading.