mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
update for traefik v2, treafik-proxy v1
- tls config is no longer allowed in static config file, add separate dynamic config - no longer need to persist auth config ourselves (TraefikProxy handles this) - make sure to reload proxy before reloading hub in tests
This commit is contained in:
@@ -156,8 +156,8 @@ def test_traefik_api_default():
|
||||
"""
|
||||
c = apply_mock_config({})
|
||||
|
||||
assert c.TraefikTomlProxy.traefik_api_username == "api_admin"
|
||||
assert len(c.TraefikTomlProxy.traefik_api_password) == 0
|
||||
assert c.TraefikProxy.traefik_api_username == "api_admin"
|
||||
assert len(c.TraefikProxy.traefik_api_password) == 0
|
||||
|
||||
|
||||
def test_set_traefik_api():
|
||||
@@ -167,8 +167,8 @@ def test_set_traefik_api():
|
||||
c = apply_mock_config(
|
||||
{"traefik_api": {"username": "some_user", "password": "1234"}}
|
||||
)
|
||||
assert c.TraefikTomlProxy.traefik_api_username == "some_user"
|
||||
assert c.TraefikTomlProxy.traefik_api_password == "1234"
|
||||
assert c.TraefikProxy.traefik_api_username == "some_user"
|
||||
assert c.TraefikProxy.traefik_api_password == "1234"
|
||||
|
||||
|
||||
def test_cull_service_default():
|
||||
@@ -268,7 +268,7 @@ def test_load_secrets(tljh_dir):
|
||||
tljh_config = configurer.load_config()
|
||||
assert tljh_config["traefik_api"]["password"] == "traefik-password"
|
||||
c = apply_mock_config(tljh_config)
|
||||
assert c.TraefikTomlProxy.traefik_api_password == "traefik-password"
|
||||
assert c.TraefikProxy.traefik_api_password == "traefik-password"
|
||||
|
||||
|
||||
def test_auth_native():
|
||||
|
||||
Reference in New Issue
Block a user