summary refs log tree commit diff
path: root/tests/config/utils.py
diff options
context:
space:
mode:
authorV02460 <git@kaialexhiller.de>2024-12-17 01:01:33 +0100
committerGitHub <noreply@github.com>2024-12-16 18:01:33 -0600
commit57bf44941e52f09dc7ea21acdbe20633b7449f5a (patch)
treed27643103f2f20f06f62380ba60c357a4f075598 /tests/config/utils.py
parentAdd `last_seen_ts` to query user example (#17976) (diff)
downloadsynapse-57bf44941e52f09dc7ea21acdbe20633b7449f5a.tar.xz
Add `macaroon_secret_key_path` config option (#17983)
Another config option on my quest to a `*_path` variant for every
secret. This time it’s `macaroon_secret_key_path`.

Reading secrets from files has the security advantage of separating the secrets from the config. It also simplifies secrets management in Kubernetes. Also useful to NixOS users.
Diffstat (limited to 'tests/config/utils.py')
-rw-r--r--tests/config/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/config/utils.py b/tests/config/utils.py

index 11140ff979..3cba4ac588 100644 --- a/tests/config/utils.py +++ b/tests/config/utils.py
@@ -51,12 +51,13 @@ class ConfigFileTestCase(unittest.TestCase): ], ) - def generate_config_and_remove_lines_containing(self, needle: str) -> None: + def generate_config_and_remove_lines_containing(self, needles: list[str]) -> None: self.generate_config() with open(self.config_file) as f: contents = f.readlines() - contents = [line for line in contents if needle not in line] + for needle in needles: + contents = [line for line in contents if needle not in line] with open(self.config_file, "w") as f: f.write("".join(contents))