Fix synapse.config module "read" command (#11145)
`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>
Showing
- changelog.d/11145.bugfix 1 addition, 0 deletionschangelog.d/11145.bugfix
- synapse/config/__main__.py 33 additions, 13 deletionssynapse/config/__main__.py
- tests/config/test___main__.py 31 additions, 0 deletionstests/config/test___main__.py
- tests/config/test_load.py 15 additions, 55 deletionstests/config/test_load.py
- tests/config/utils.py 58 additions, 0 deletionstests/config/utils.py
Loading
Please register or sign in to comment