From 6f10405d3003fb0c67c08bb83533edd82458fb69 Mon Sep 17 00:00:00 2001 From: "Kai A. Hiller" Date: Mon, 2 Dec 2024 15:43:45 +0100 Subject: [PATCH] Test macaroon_secret_key{,_path} --- tests/config/test_load.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/config/test_load.py b/tests/config/test_load.py index 1fc8723fae..f8f7b72e40 100644 --- a/tests/config/test_load.py +++ b/tests/config/test_load.py @@ -131,6 +131,7 @@ class ConfigLoadingFileTestCase(ConfigFileTestCase): [ "turn_shared_secret_path: /does/not/exist", "registration_shared_secret_path: /does/not/exist", + "macaroon_secret_key_path: /does/not/exist", *["redis:\n enabled: true\n password_path: /does/not/exist"] * (hiredis is not None), ] @@ -152,6 +153,10 @@ class ConfigLoadingFileTestCase(ConfigFileTestCase): "registration_shared_secret_path: {}", lambda c: c.registration.registration_shared_secret.encode("utf-8"), ), + ( + "macaroon_secret_key_path: {}", + lambda c: c.key.macaroon_secret_key, + ), *[ ( "redis:\n enabled: true\n password_path: {}", @@ -164,7 +169,9 @@ class ConfigLoadingFileTestCase(ConfigFileTestCase): def test_secret_files_existing( self, config_line: str, get_secret: Callable[[RootConfig], str] ) -> None: - self.generate_config_and_remove_lines_containing(["registration_shared_secret"]) + self.generate_config_and_remove_lines_containing( + ["registration_shared_secret", "macaroon_secret_key"] + ) with tempfile.NamedTemporaryFile(buffering=0) as secret_file: secret_file.write(b"53C237")