(t *testing.T)
| 491 | } |
| 492 | |
| 493 | func TestFindPrimaryAddr(t *testing.T) { |
| 494 | ip, err := FindPrimaryAddr() |
| 495 | if err != nil && strings.Contains(err.Error(), "network is unreachable") { |
| 496 | // Skip test if dial fails. |
| 497 | // This is to allow tests to be run offline/without third-party dependencies. |
| 498 | t.Skipf("WARNING: network is unreachable: %s", err) |
| 499 | } |
| 500 | |
| 501 | assert.NotEqual(t, nil, ip) |
| 502 | assert.NotEqual(t, "", ip.String()) |
| 503 | assert.NotEqual(t, "<nil>", ip.String()) |
| 504 | } |
| 505 | |
| 506 | func TestReplaceAll(t *testing.T) { |
| 507 | tests := []struct { |
nothing calls this directly
no test coverage detected