Helper function to convert test node IDs to prefixes Maps single letter IDs to IP addresses in 10.0.0.x/32 range
(nodeId string)
| 20 | // Helper function to convert test node IDs to prefixes |
| 21 | // Maps single letter IDs to IP addresses in 10.0.0.x/32 range |
| 22 | func nodeToPrefix(nodeId string) netip.Prefix { |
| 23 | var ipByte byte |
| 24 | if len(nodeId) > 0 { |
| 25 | ipByte = strings.ToLower(nodeId)[0] - 'a' + 1 |
| 26 | } |
| 27 | return netip.MustParsePrefix(fmt.Sprintf("10.0.0.%d/32", ipByte)) |
| 28 | } |
| 29 | |
| 30 | func TestRouterBasicComputeRoutes(t *testing.T) { |
| 31 | tunables := ConfigureConstants() |
no outgoing calls
no test coverage detected