Skip to content

Commit

Permalink
[e2e] Check network health after bootstrap checks (#3466)
Browse files Browse the repository at this point in the history
  • Loading branch information
marun authored Oct 18, 2024
1 parent 2c84afe commit b24c1a7
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/e2e/banff/suites.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,7 @@ var _ = ginkgo.Describe("[Banff]", func() {

tc.Outf("{{green}}issued X-chain import{{/}}: %s\n", tx.ID())
})

_ = e2e.CheckBootstrapIsPossible(tc, env.GetNetwork())
})
})
2 changes: 2 additions & 0 deletions tests/e2e/p/elastic_subnets.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,5 +190,7 @@ var _ = e2e.DescribePChain("[Elastic Subnets]", func() {
)
require.NoError(err)
})

_ = e2e.CheckBootstrapIsPossible(tc, env.GetNetwork())
})
})
2 changes: 2 additions & 0 deletions tests/e2e/p/owner_retrieval.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,7 @@ var _ = e2e.DescribePChain("[P-Chain Wallet]", func() {
require.Equal(newOwner.Threshold, subnetOwner.Threshold)
require.Equal(newOwner.Addrs, subnetOwner.Addrs)
})

_ = e2e.CheckBootstrapIsPossible(tc, env.GetNetwork())
})
})
2 changes: 2 additions & 0 deletions tests/e2e/p/permissionless_layer_one.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,7 @@ var _ = e2e.DescribePChain("[Permissionless L1]", func() {
ManagerChainID: chainID,
ManagerAddress: address,
}, res)

_ = e2e.CheckBootstrapIsPossible(tc, env.GetNetwork())
})
})
2 changes: 2 additions & 0 deletions tests/e2e/p/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,7 @@ var _ = e2e.DescribePChain("[Workflow]", func() {

require.Equal(initialAVAXBalance+toTransfer-xContext.BaseTxFee, finalAVAXBalance)
})

_ = e2e.CheckBootstrapIsPossible(tc, env.GetNetwork())
})
})
2 changes: 2 additions & 0 deletions tests/e2e/x/transfer/virtuous.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,5 +305,7 @@ RECEIVER NEW BALANCE (AFTER) : %21d AVAX
runFunc(i)
time.Sleep(time.Second)
}

_ = e2e.CheckBootstrapIsPossible(tc, env.GetNetwork())
})
})
11 changes: 11 additions & 0 deletions tests/fixture/e2e/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,17 @@ func CheckBootstrapIsPossible(tc tests.TestContext, network *tmpnet.Network) *tm

// Check that the node becomes healthy within timeout
require.NoError(tmpnet.WaitForHealthy(tc.DefaultContext(), node))

// Ensure that the primary validators are still healthy
for _, node := range network.Nodes {
if node.IsEphemeral {
continue
}
healthy, err := node.IsHealthy(tc.DefaultContext())
require.NoError(err)
require.True(healthy, "primary validator %s is not healthy", node.NodeID)
}

return node
}

Expand Down

0 comments on commit b24c1a7

Please sign in to comment.