INNER CODE UNIT · Python
test_cert_sans_single_source
onedr0p/cluster-template · template/scripts/test_validate.py:115
def test_cert_sans_single_source():
raw = config_from("public.toml")
assert _load_raw(raw).cert_sans == ["127.0.0.1", "10.10.10.254", "example.com"]
raw = config_from("private.toml")
assert _load_raw(raw).cert_sans == ["127.0.0.1", "10.10.10.254"]
def test_ingress_mode_follows_dns_provider():
cloudflare = config_from("public.toml", ingress=None)
assert _load_raw(cloudflare).ingress.mode == "cloudflare-tunnel"
internal = config_from("internal.toml")
assert (REPO_ROOT / ".github/template-tests/valid/internal.toml").exists()
assert "ingress" not in internal
assert _load_raw(internal).ingress.mode == "none"
def test_direct_mode_requires_cloudflare_dns():
raw = config_from("internal.toml", **{"ingress.mode": "direct"})