MCPcopy Create free account
hub / github.com/encodeous/nylon / TestCentralConfigValidator_OverlappingPrefix

Function TestCentralConfigValidator_OverlappingPrefix

state/validation_test.go:58–90  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

56}
57
58func TestCentralConfigValidator_OverlappingPrefix(t *testing.T) {
59 cfg := &CentralCfg{
60 Routers: []RouterCfg{
61 {
62 NodeCfg: NodeCfg{
63 Id: "node1",
64 PubKey: NyPublicKey{},
65 Prefixes: []PrefixHealthWrapper{
66 {
67 &StaticPrefixHealth{
68 Prefix: netip.MustParsePrefix("10.5.0.1/32"),
69 Metric: 0,
70 },
71 },
72 {
73 &StaticPrefixHealth{
74 Prefix: netip.MustParsePrefix("10.5.0.0/24"),
75 Metric: 0,
76 },
77 },
78 {
79 &StaticPrefixHealth{
80 Prefix: netip.MustParsePrefix("10.5.0.1/8"),
81 Metric: 0,
82 },
83 },
84 },
85 },
86 },
87 },
88 }
89 assert.NoError(t, CentralConfigValidator(cfg))
90}
91
92func TestCentralConfigValidator_PassiveClientNonStaticPrefix(t *testing.T) {
93 cfg := &CentralCfg{

Callers

nothing calls this directly

Calls 1

CentralConfigValidatorFunction · 0.85

Tested by

no test coverage detected