ensure test hosts are only on loopback

This commit is contained in:
vyzo 2018-10-03 16:22:58 +03:00
parent c640cd812b
commit 8c66f57ec6
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ import (
)
func makeAutoNAT(ctx context.Context, t *testing.T) (host.Host, AutoNAT) {
h, err := libp2p.New(ctx)
h, err := libp2p.New(ctx, libp2p.ListenAddrStrings("/ip4/127.0.0.1/tcp/0"))
if err != nil {
t.Fatal(err)
}

View File

@ -12,7 +12,7 @@ import (
)
func makeAutoNATService(ctx context.Context, t *testing.T) (host.Host, *AutoNATService) {
h, err := libp2p.New(ctx)
h, err := libp2p.New(ctx, libp2p.ListenAddrStrings("/ip4/127.0.0.1/tcp/0"))
if err != nil {
t.Fatal(err)
}
@ -26,7 +26,7 @@ func makeAutoNATService(ctx context.Context, t *testing.T) (host.Host, *AutoNATS
}
func makeAutoNATClient(ctx context.Context, t *testing.T) (host.Host, AutoNATClient) {
h, err := libp2p.New(ctx)
h, err := libp2p.New(ctx, libp2p.ListenAddrStrings("/ip4/127.0.0.1/tcp/0"))
if err != nil {
t.Fatal(err)
}