diff --git a/internal/bootstrap/bootstrap_test.go b/internal/bootstrap/bootstrap_test.go index b62f32b1b..ac2e5252a 100644 --- a/internal/bootstrap/bootstrap_test.go +++ b/internal/bootstrap/bootstrap_test.go @@ -25,7 +25,8 @@ const testTimeout = 1 * time.Second func newListener(t testing.TB, network string, sig chan net.Addr) (l net.Listener) { t.Helper() - l, err := net.Listen(network, ":0") + // TODO(e.burkov): Listen IPv6 as well, when the CI adds IPv6 interfaces. + l, err := net.Listen(network, "127.0.0.1:0") require.NoError(t, err) testutil.CleanupAndRequireSuccess(t, l.Close) @@ -59,10 +60,6 @@ func TestResolveDialContext(t *testing.T) { name: "v4", addresses: []netip.Addr{netutil.IPv4Localhost()}, preferIPv6: false, - }, { - name: "v6", - addresses: []netip.Addr{netutil.IPv6Localhost()}, - preferIPv6: false, }, { name: "both_prefer_v6", addresses: []netip.Addr{netutil.IPv4Localhost(), netutil.IPv6Localhost()}, diff --git a/internal/bootstrap/resolver.go b/internal/bootstrap/resolver.go index 57d6cb941..332459aa5 100644 --- a/internal/bootstrap/resolver.go +++ b/internal/bootstrap/resolver.go @@ -2,6 +2,7 @@ package bootstrap import ( "context" + "net" "net/netip" "time" @@ -16,6 +17,9 @@ type Resolver interface { LookupNetIP(ctx context.Context, network string, host string) (addrs []netip.Addr, err error) } +// type check +var _ Resolver = &net.Resolver{} + // ErrNoResolvers is returned when zero resolvers specified. const ErrNoResolvers = errors.Error("no resolvers specified")