(t *testing.T)
| 56 | } |
| 57 | |
| 58 | func 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 | |
| 92 | func TestCentralConfigValidator_PassiveClientNonStaticPrefix(t *testing.T) { |
| 93 | cfg := &CentralCfg{ |
nothing calls this directly
no test coverage detected