diff --git a/p2p/host/basic/basic_host_test.go b/p2p/host/basic/basic_host_test.go index 07f82825f..2ecd22f10 100644 --- a/p2p/host/basic/basic_host_test.go +++ b/p2p/host/basic/basic_host_test.go @@ -224,8 +224,8 @@ func TestAllAddrs(t *testing.T) { // listen on IPv4 0.0.0.0 require.NoError(t, h.Network().Listen(ma.StringCast("/ip4/0.0.0.0/tcp/0"))) - // should contain localhost and private local addr along with previous listen address - require.Len(t, h.AllAddrs(), 3) + // should contain more addresses than just the one from last time + require.Greater(t, len(h.AllAddrs()), 1) // Should still contain the original addr. require.True(t, ma.Contains(h.AllAddrs(), firstAddr), "should still contain the original addr") }