From 743f729902ec14d22f81420f58f9772077982d36 Mon Sep 17 00:00:00 2001 From: Jordan Bradford <36420801+jrdnbradford@users.noreply.github.com> Date: Wed, 20 Mar 2024 14:45:36 -0400 Subject: [PATCH] Update `set_config_value` tests --- tests/test_traefik.py | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/tests/test_traefik.py b/tests/test_traefik.py index f950266..380ac4c 100644 --- a/tests/test_traefik.py +++ b/tests/test_traefik.py @@ -64,12 +64,12 @@ def test_default_config(tmpdir, tljh_dir): def test_letsencrypt_config(tljh_dir): state_dir = config.STATE_DIR - config.set_config_value(config.CONFIG_FILE, "https.enabled", True) + config.set_config_value(config.CONFIG_FILE, "https.enabled", True, True) config.set_config_value( - config.CONFIG_FILE, "https.letsencrypt.email", "fake@jupyter.org" + config.CONFIG_FILE, "https.letsencrypt.email", "fake@jupyter.org", True ) config.set_config_value( - config.CONFIG_FILE, "https.letsencrypt.domains", ["testing.jovyan.org"] + config.CONFIG_FILE, "https.letsencrypt.domains", ["testing.jovyan.org"], True ) traefik.ensure_traefik_config(str(state_dir)) @@ -138,9 +138,13 @@ def test_letsencrypt_config(tljh_dir): def test_manual_ssl_config(tljh_dir): state_dir = config.STATE_DIR - config.set_config_value(config.CONFIG_FILE, "https.enabled", True) - config.set_config_value(config.CONFIG_FILE, "https.tls.key", "/path/to/ssl.key") - config.set_config_value(config.CONFIG_FILE, "https.tls.cert", "/path/to/ssl.cert") + config.set_config_value(config.CONFIG_FILE, "https.enabled", True, True) + config.set_config_value( + config.CONFIG_FILE, "https.tls.key", "/path/to/ssl.key", True + ) + config.set_config_value( + config.CONFIG_FILE, "https.tls.cert", "/path/to/ssl.cert", True + ) traefik.ensure_traefik_config(str(state_dir)) cfg = _read_static_config(state_dir) @@ -244,12 +248,16 @@ def test_extra_config(tmpdir, tljh_dir): def test_listen_address(tmpdir, tljh_dir): state_dir = config.STATE_DIR - config.set_config_value(config.CONFIG_FILE, "https.enabled", True) - config.set_config_value(config.CONFIG_FILE, "https.tls.key", "/path/to/ssl.key") - config.set_config_value(config.CONFIG_FILE, "https.tls.cert", "/path/to/ssl.cert") + config.set_config_value(config.CONFIG_FILE, "https.enabled", True, True) + config.set_config_value( + config.CONFIG_FILE, "https.tls.key", "/path/to/ssl.key", True + ) + config.set_config_value( + config.CONFIG_FILE, "https.tls.cert", "/path/to/ssl.cert", True + ) - config.set_config_value(config.CONFIG_FILE, "http.address", "127.0.0.1") - config.set_config_value(config.CONFIG_FILE, "https.address", "127.0.0.1") + config.set_config_value(config.CONFIG_FILE, "http.address", "127.0.0.1", True) + config.set_config_value(config.CONFIG_FILE, "https.address", "127.0.0.1", True) traefik.ensure_traefik_config(str(state_dir))