mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Use default true for validate
This commit is contained in:
@@ -63,9 +63,9 @@ def test_manual_https(preserve_config):
|
|||||||
"/CN=tljh.jupyer.org",
|
"/CN=tljh.jupyer.org",
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
set_config_value(CONFIG_FILE, "https.enabled", True, True)
|
set_config_value(CONFIG_FILE, "https.enabled", True)
|
||||||
set_config_value(CONFIG_FILE, "https.tls.key", key, True)
|
set_config_value(CONFIG_FILE, "https.tls.key", key)
|
||||||
set_config_value(CONFIG_FILE, "https.tls.cert", cert, True)
|
set_config_value(CONFIG_FILE, "https.tls.cert", cert)
|
||||||
reload_component("proxy")
|
reload_component("proxy")
|
||||||
for i in range(10):
|
for i in range(10):
|
||||||
time.sleep(i)
|
time.sleep(i)
|
||||||
@@ -89,7 +89,7 @@ def test_manual_https(preserve_config):
|
|||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
shutil.rmtree(ssl_dir)
|
shutil.rmtree(ssl_dir)
|
||||||
set_config_value(CONFIG_FILE, "https.enabled", False, True)
|
set_config_value(CONFIG_FILE, "https.enabled", False)
|
||||||
|
|
||||||
reload_component("proxy")
|
reload_component("proxy")
|
||||||
|
|
||||||
|
|||||||
@@ -64,12 +64,12 @@ def test_default_config(tmpdir, tljh_dir):
|
|||||||
|
|
||||||
def test_letsencrypt_config(tljh_dir):
|
def test_letsencrypt_config(tljh_dir):
|
||||||
state_dir = config.STATE_DIR
|
state_dir = config.STATE_DIR
|
||||||
config.set_config_value(config.CONFIG_FILE, "https.enabled", True, True)
|
config.set_config_value(config.CONFIG_FILE, "https.enabled")
|
||||||
config.set_config_value(
|
config.set_config_value(
|
||||||
config.CONFIG_FILE, "https.letsencrypt.email", "fake@jupyter.org", True
|
config.CONFIG_FILE, "https.letsencrypt.email", "fake@jupyter.org"
|
||||||
)
|
)
|
||||||
config.set_config_value(
|
config.set_config_value(
|
||||||
config.CONFIG_FILE, "https.letsencrypt.domains", ["testing.jovyan.org"], True
|
config.CONFIG_FILE, "https.letsencrypt.domains", ["testing.jovyan.org"]
|
||||||
)
|
)
|
||||||
traefik.ensure_traefik_config(str(state_dir))
|
traefik.ensure_traefik_config(str(state_dir))
|
||||||
|
|
||||||
@@ -138,13 +138,9 @@ def test_letsencrypt_config(tljh_dir):
|
|||||||
|
|
||||||
def test_manual_ssl_config(tljh_dir):
|
def test_manual_ssl_config(tljh_dir):
|
||||||
state_dir = config.STATE_DIR
|
state_dir = config.STATE_DIR
|
||||||
config.set_config_value(config.CONFIG_FILE, "https.enabled", True, True)
|
config.set_config_value(config.CONFIG_FILE, "https.enabled", True)
|
||||||
config.set_config_value(
|
config.set_config_value(config.CONFIG_FILE, "https.tls.key", "/path/to/ssl.key")
|
||||||
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")
|
||||||
)
|
|
||||||
config.set_config_value(
|
|
||||||
config.CONFIG_FILE, "https.tls.cert", "/path/to/ssl.cert", True
|
|
||||||
)
|
|
||||||
traefik.ensure_traefik_config(str(state_dir))
|
traefik.ensure_traefik_config(str(state_dir))
|
||||||
|
|
||||||
cfg = _read_static_config(state_dir)
|
cfg = _read_static_config(state_dir)
|
||||||
@@ -248,16 +244,12 @@ def test_extra_config(tmpdir, tljh_dir):
|
|||||||
|
|
||||||
def test_listen_address(tmpdir, tljh_dir):
|
def test_listen_address(tmpdir, tljh_dir):
|
||||||
state_dir = config.STATE_DIR
|
state_dir = config.STATE_DIR
|
||||||
config.set_config_value(config.CONFIG_FILE, "https.enabled", True, True)
|
config.set_config_value(config.CONFIG_FILE, "https.enabled", True)
|
||||||
config.set_config_value(
|
config.set_config_value(config.CONFIG_FILE, "https.tls.key", "/path/to/ssl.key")
|
||||||
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")
|
||||||
)
|
|
||||||
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", 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", True)
|
config.set_config_value(config.CONFIG_FILE, "https.address", "127.0.0.1")
|
||||||
|
|
||||||
traefik.ensure_traefik_config(str(state_dir))
|
traefik.ensure_traefik_config(str(state_dir))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user