summary refs log tree commit diff
path: root/tests/config/test_load.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add missing type hints to tests.config. (#14681)Patrick Cloke2022-12-161-6/+6
|
* 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-221-55/+15
| | | | | | | | | | `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>
* Require direct references to configuration variables. (#10985)Patrick Cloke2021-10-061-4/+8
| | | | | | 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-231-5/+5
|
* [pyupgrade] `tests/` (#10347)Jonathan de Jong2021-07-131-2/+2
|
* 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>`
* Fix reported bugbear: too broad exception assertion (#9753)Andrew Morgan2021-04-061-2/+3
|
* Fix new flake8 errors (#7470)Erik Johnston2020-05-121-1/+1
|
* Servers-known-about statistic (#5981)Amber Brown2019-09-071-12/+22
|
* Use yaml safe_loadErik Johnston2019-03-221-1/+1
|
* Run black.black2018-08-101-18/+20
|
* run isortAmber Brown2018-07-091-0/+3
|
* 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>
* Add function to load config without generating itMark Haines2016-06-091-2/+20
| | | | | | | | | | | | | | | | 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-051-0/+77
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.