mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 18:34:56 -04:00
Improve database configuration docs (#6988)
Attempts to clarify the sample config for databases, and add some stuff about tcp keepalives to `postgres.md`.
This commit is contained in:
parent
fdb1344716
commit
c165c1233b
6 changed files with 132 additions and 71 deletions
|
@ -21,9 +21,9 @@ from tests import unittest
|
|||
|
||||
|
||||
class DatabaseConfigTestCase(unittest.TestCase):
|
||||
def test_database_configured_correctly_no_database_conf_param(self):
|
||||
def test_database_configured_correctly(self):
|
||||
conf = yaml.safe_load(
|
||||
DatabaseConfig().generate_config_section("/data_dir_path", None)
|
||||
DatabaseConfig().generate_config_section(data_dir_path="/data_dir_path")
|
||||
)
|
||||
|
||||
expected_database_conf = {
|
||||
|
@ -32,21 +32,3 @@ class DatabaseConfigTestCase(unittest.TestCase):
|
|||
}
|
||||
|
||||
self.assertEqual(conf["database"], expected_database_conf)
|
||||
|
||||
def test_database_configured_correctly_database_conf_param(self):
|
||||
|
||||
database_conf = {
|
||||
"name": "my super fast datastore",
|
||||
"args": {
|
||||
"user": "matrix",
|
||||
"password": "synapse_database_password",
|
||||
"host": "synapse_database_host",
|
||||
"database": "matrix",
|
||||
},
|
||||
}
|
||||
|
||||
conf = yaml.safe_load(
|
||||
DatabaseConfig().generate_config_section("/data_dir_path", database_conf)
|
||||
)
|
||||
|
||||
self.assertEqual(conf["database"], database_conf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue