( t *testing.T, mapper *addressRewriteMapper, candidateType CandidateType, localIP string, iface string, expected ...string, )
| 26 | } |
| 27 | |
| 28 | func assertExternalIPStrings( |
| 29 | t *testing.T, |
| 30 | mapper *addressRewriteMapper, |
| 31 | candidateType CandidateType, |
| 32 | localIP string, |
| 33 | iface string, |
| 34 | expected ...string, |
| 35 | ) { |
| 36 | t.Helper() |
| 37 | |
| 38 | ips, matched, _, err := mapper.findExternalIPs(candidateType, localIP, iface) |
| 39 | assert.NoError(t, err) |
| 40 | assert.True(t, matched) |
| 41 | assert.Len(t, ips, len(expected)) |
| 42 | for i, ip := range ips { |
| 43 | assert.Equal(t, expected[i], ip.String()) |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | func assertNoExternalMapping(t *testing.T, mapper *addressRewriteMapper, candidateType CandidateType, localIP string) { |
| 48 | t.Helper() |
no test coverage detected
searching dependent graphs…