Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add network integration test with kademilia instead mDNS #3787

Merged
merged 12 commits into from
Mar 11, 2024
Prev Previous commit
Next Next commit
chore: linter and license fix
  • Loading branch information
P1sar committed Mar 4, 2024
commit 7eb0dd4b1342dd3ff50d3c0d6161b32367fe1afa
14 changes: 10 additions & 4 deletions tests/network/netwrok_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2021 ChainSafe Systems (ON)
// SPDX-License-Identifier: LGPL-3.0-only

package network

import (
Expand All @@ -19,7 +22,7 @@ import (
"time"
)

func TestKadDHTNetworkDiscovery(t *testing.T) { //nolint:tparallel
func TestKadDHTNetworkDiscovery(t *testing.T) {
jimjbrettj marked this conversation as resolved.
Show resolved Hide resolved
if utils.MODE != "network" {
t.Skip("RPC tests are disabled, going to skip.")
}
Expand All @@ -35,19 +38,22 @@ func TestKadDHTNetworkDiscovery(t *testing.T) { //nolint:tparallel
con.Core.BabeAuthority = true
con.Log.Sync = "trace"
con.Network.Port = 7001
con.BasePath = xdg.DataHome + "/gossamer/westend-local/alice" // ID: 12D3KooWMHixgmjFYM4VyQNDTKMvN9BPw47Tyyb6LPZ43EavV68m
// ID: 12D3KooWMHixgmjFYM4VyQNDTKMvN9BPw47Tyyb6LPZ43EavV68m
con.BasePath = xdg.DataHome + "/gossamer/westend-local/alice"
P1sar marked this conversation as resolved.
Show resolved Hide resolved

peerConfigBoB := cfg.Copy(&con)
peerConfigBoB.Network.Bootnodes = []string{
"/ip4/127.0.0.1/tcp/7001/p2p/12D3KooWMHixgmjFYM4VyQNDTKMvN9BPw47Tyyb6LPZ43EavV68m",
}
peerConfigBoB.Core.BabeAuthority = false
peerConfigBoB.Network.Port = 7002
peerConfigBoB.BasePath = xdg.DataHome + "/gossamer/westend-local/bob" // ID: 12D3KooWPBa1zBhwtcfvXZdY5p8CyPmLLdPBJVFrZpRAhFXfzpzn
// ID: 12D3KooWPBa1zBhwtcfvXZdY5p8CyPmLLdPBJVFrZpRAhFXfzpzn
peerConfigBoB.BasePath = xdg.DataHome + "/gossamer/westend-local/bob"

peerConfigCharlie := cfg.Copy(&peerConfigBoB)
peerConfigCharlie.Network.Port = 7003
peerConfigCharlie.BasePath = xdg.DataHome + "/gossamer/westend-local/charlie" // ID: 12D3KooWMMyCYHmj2d7uVvYLGx98QfUf62arxXkTSugCpnKKfpxg
// ID: 12D3KooWMMyCYHmj2d7uVvYLGx98QfUf62arxXkTSugCpnKKfpxg
peerConfigCharlie.BasePath = xdg.DataHome + "/gossamer/westend-local/charlie"

alice := node.New(t, con, node.SetIndex(0), node.SetWriter(os.Stdout))
charlie := node.New(t, peerConfigCharlie, node.SetIndex(1), node.SetWriter(os.Stdout))
Expand Down
Loading