mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 06:34:56 -04:00
Servers-known-about statistic (#5981)
This commit is contained in:
parent
78801e7f9e
commit
55d5b3af88
7 changed files with 225 additions and 59 deletions
|
@ -17,6 +17,8 @@ import os.path
|
|||
import re
|
||||
import shutil
|
||||
import tempfile
|
||||
from contextlib import redirect_stdout
|
||||
from io import StringIO
|
||||
|
||||
from synapse.config.homeserver import HomeServerConfig
|
||||
|
||||
|
@ -32,17 +34,18 @@ class ConfigGenerationTestCase(unittest.TestCase):
|
|||
shutil.rmtree(self.dir)
|
||||
|
||||
def test_generate_config_generates_files(self):
|
||||
HomeServerConfig.load_or_generate_config(
|
||||
"",
|
||||
[
|
||||
"--generate-config",
|
||||
"-c",
|
||||
self.file,
|
||||
"--report-stats=yes",
|
||||
"-H",
|
||||
"lemurs.win",
|
||||
],
|
||||
)
|
||||
with redirect_stdout(StringIO()):
|
||||
HomeServerConfig.load_or_generate_config(
|
||||
"",
|
||||
[
|
||||
"--generate-config",
|
||||
"-c",
|
||||
self.file,
|
||||
"--report-stats=yes",
|
||||
"-H",
|
||||
"lemurs.win",
|
||||
],
|
||||
)
|
||||
|
||||
self.assertSetEqual(
|
||||
set(["homeserver.yaml", "lemurs.win.log.config", "lemurs.win.signing.key"]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue