INNER CODE UNIT · Python

test_partial_bgp_rejected

onedr0p/cluster-template · template/scripts/test_validate.py:144

def test_partial_bgp_rejected():
    raw = config_from("private.toml", **{"cilium.bgp.router_addr": "10.10.1.1", "cilium.bgp.router_asn": "64513"})
    with pytest.raises(ConfigError, match="partially configured"):
        _load_raw(raw)


def test_node_defaults_exported():
    data = _load_raw(config_from("private.toml")).model_dump(mode="json")
    node = data["nodes"][0]
    assert node["mtu"] == 1500
    assert node["secureboot"] is False
    assert node["kernel_modules"] == []


def test_gateways_may_leave_node_cidr_only_with_bgp():
    with_bgp = config_from("public.toml", **{"gateways.external": "192.168.50.1"})
    _load_raw(with_bgp)  # public.toml enables BGP
    without_bgp = config_from("private.toml", **{"gateways.external": "192.168.50.1"})

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…