@@ -26,6 +26,11 @@ var _ = ginkgo.Describe("Duplicate node handling", func() {
26
26
ginkgo .It ("should ensure that a given Node ID (i.e. staking keypair) can be used at most once on a network" , func () {
27
27
network := e2e .GetEnv (tc ).GetNetwork ()
28
28
29
+ if network .DefaultRuntimeConfig .KubeRuntimeConfig != nil {
30
+ // Enabling this test for kube requires supporting a flexible name mapping
31
+ ginkgo .Skip ("This test is not supported on kube to avoid having to deviate from composing the statefulset name with the network uuid + nodeid" )
32
+ }
33
+
29
34
tc .By ("creating new node" )
30
35
node1 := e2e .AddEphemeralNode (tc , network , tmpnet.FlagsMap {})
31
36
e2e .WaitForHealthy (tc , node1 )
@@ -43,10 +48,10 @@ var _ = ginkgo.Describe("Duplicate node handling", func() {
43
48
// the same node ID.
44
49
config .DataDirKey : fmt .Sprintf ("%s-second" , node1Flags [config .DataDirKey ]),
45
50
}
46
- node2 := e2e .AddEphemeralNode (tc , network , node2Flags )
51
+ node2 := e2e .AddEphemeralNodeWithWaitForHealth (tc , network , node2Flags , false /* waitForHealth */ )
47
52
48
53
tc .By ("checking that the second new node fails to become healthy before timeout" )
49
- err := tmpnet .WaitForHealthy (tc .DefaultContext (), node2 )
54
+ err := tmpnet .WaitForHealthyNode (tc .DefaultContext (), tc . Log (), node2 )
50
55
require .ErrorIs (err , context .DeadlineExceeded )
51
56
52
57
tc .By ("stopping the first new node" )
@@ -68,7 +73,8 @@ func checkConnectedPeers(tc tests.TestContext, existingNodes []*tmpnet.Node, new
68
73
require := require .New (tc )
69
74
70
75
// Collect the node ids of the new node's peers
71
- infoClient := info .NewClient (newNode .URI )
76
+ uri := e2e .GetLocalURI (tc , newNode )
77
+ infoClient := info .NewClient (uri )
72
78
peers , err := infoClient .Peers (tc .DefaultContext (), nil )
73
79
require .NoError (err )
74
80
peerIDs := set.NewSet [ids.NodeID ](len (existingNodes ))
@@ -81,7 +87,8 @@ func checkConnectedPeers(tc tests.TestContext, existingNodes []*tmpnet.Node, new
81
87
require .True (peerIDs .Contains (existingNode .NodeID ))
82
88
83
89
// Check that the new node is a peer
84
- infoClient := info .NewClient (existingNode .URI )
90
+ uri := e2e .GetLocalURI (tc , existingNode )
91
+ infoClient := info .NewClient (uri )
85
92
peers , err := infoClient .Peers (tc .DefaultContext (), nil )
86
93
require .NoError (err )
87
94
isPeer := false
0 commit comments