Skip to content

Commit

Permalink
Merge pull request #576 from ava-labs/test-cleanup
Browse files Browse the repository at this point in the history
Test cleanup
  • Loading branch information
geoff-vball authored Sep 26, 2024
2 parents 0b5e0e2 + 3a61c5a commit 32c5f81
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 71 deletions.
5 changes: 5 additions & 0 deletions tests/flows/validator-manager/erc20_delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func ERC20Delegation(network interfaces.LocalNetwork) {
)
Expect(err).Should(BeNil())
validationID = utils.InitializeAndCompleteERC20ValidatorRegistration(
ctx,
network,
signatureAggregator,
fundedKey,
Expand Down Expand Up @@ -96,6 +97,7 @@ func ERC20Delegation(network interfaces.LocalNetwork) {
nonce := uint64(1)

receipt := utils.InitializeERC20DelegatorRegistration(
ctx,
fundedKey,
subnetAInfo,
validationID,
Expand Down Expand Up @@ -136,6 +138,7 @@ func ERC20Delegation(network interfaces.LocalNetwork) {

// Deliver the Warp message to the subnet
receipt = utils.CompleteERC20DelegatorRegistration(
ctx,
fundedKey,
delegationID,
subnetAInfo,
Expand All @@ -157,6 +160,7 @@ func ERC20Delegation(network interfaces.LocalNetwork) {
{
nonce := uint64(2)
receipt := utils.InitializeEndERC20Delegation(
ctx,
fundedKey,
subnetAInfo,
stakingManager,
Expand Down Expand Up @@ -191,6 +195,7 @@ func ERC20Delegation(network interfaces.LocalNetwork) {

// Deliver the Warp message to the subnet
receipt = utils.CompleteEndERC20Delegation(
ctx,
fundedKey,
delegationID,
subnetAInfo,
Expand Down
2 changes: 2 additions & 0 deletions tests/flows/validator-manager/erc20_token_staking.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) {
)
Expect(err).Should(BeNil())
validationID := utils.InitializeAndCompleteERC20ValidatorRegistration(
ctx,
network,
signatureAggregator,
fundedKey,
Expand All @@ -88,6 +89,7 @@ func ERC20TokenStakingManager(network interfaces.LocalNetwork) {
// Delist the validator
//
utils.InitializeAndCompleteEndERC20Validation(
ctx,
network,
signatureAggregator,
fundedKey,
Expand Down
5 changes: 5 additions & 0 deletions tests/flows/validator-manager/native_delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func NativeDelegation(network interfaces.LocalNetwork) {
Expect(err).Should(BeNil())
stakeAmount := new(big.Int).SetUint64(utils.DefaultMinStakeAmount)
validationID = utils.InitializeAndCompleteNativeValidatorRegistration(
ctx,
network,
signatureAggregator,
fundedKey,
Expand All @@ -97,6 +98,7 @@ func NativeDelegation(network interfaces.LocalNetwork) {
nonce := uint64(1)

receipt := utils.InitializeNativeDelegatorRegistration(
ctx,
fundedKey,
subnetAInfo,
validationID,
Expand Down Expand Up @@ -136,6 +138,7 @@ func NativeDelegation(network interfaces.LocalNetwork) {

// Deliver the Warp message to the subnet
receipt = utils.CompleteNativeDelegatorRegistration(
ctx,
fundedKey,
delegationID,
subnetAInfo,
Expand All @@ -157,6 +160,7 @@ func NativeDelegation(network interfaces.LocalNetwork) {
{
nonce := uint64(2)
receipt := utils.InitializeEndNativeDelegation(
ctx,
fundedKey,
subnetAInfo,
stakingManager,
Expand Down Expand Up @@ -191,6 +195,7 @@ func NativeDelegation(network interfaces.LocalNetwork) {

// Deliver the Warp message to the subnet
receipt = utils.CompleteEndNativeDelegation(
ctx,
fundedKey,
delegationID,
subnetAInfo,
Expand Down
2 changes: 2 additions & 0 deletions tests/flows/validator-manager/native_token_staking.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) {
Expect(err).Should(BeNil())
// Iniatiate validator registration
validationID := utils.InitializeAndCompleteNativeValidatorRegistration(
ctx,
network,
signatureAggregator,
fundedKey,
Expand All @@ -90,6 +91,7 @@ func NativeTokenStakingManager(network interfaces.LocalNetwork) {
// Delist the validator
//
utils.InitializeAndCompleteEndNativeValidation(
ctx,
network,
signatureAggregator,
fundedKey,
Expand Down
4 changes: 4 additions & 0 deletions tests/flows/validator-manager/poa_to_pos.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) {
// Register a validator
poaWeight := uint64(1)
poaValidationID := utils.InitializeAndCompletePoAValidatorRegistration(
ctx,
network,
signatureAggregator,
ownerKey,
Expand Down Expand Up @@ -193,6 +194,7 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) {
Expect(err).Should(BeNil())

posValidationID := utils.InitializeAndCompleteNativeValidatorRegistration(
ctx,
network,
signatureAggregator,
fundedKey,
Expand All @@ -205,6 +207,7 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) {

// Delist the previous PoA validator
utils.InitializeAndCompleteEndNativeValidation(
ctx,
network,
signatureAggregator,
ownerKey,
Expand All @@ -219,6 +222,7 @@ func PoAMigrationToPoS(network interfaces.LocalNetwork) {

// Delist the PoS validator
utils.InitializeAndCompleteEndNativeValidation(
ctx,
network,
signatureAggregator,
fundedKey,
Expand Down
2 changes: 2 additions & 0 deletions tests/flows/validator-manager/poa_validator_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ func PoAValidatorManager(network interfaces.LocalNetwork) {

// Initiate validator registration
validationID = utils.InitializeAndCompletePoAValidatorRegistration(
ctx,
network,
signatureAggregator,
ownerKey,
Expand All @@ -133,6 +134,7 @@ func PoAValidatorManager(network interfaces.LocalNetwork) {
Expect(err).ShouldNot(BeNil())

utils.InitializeAndCompleteEndPoAValidation(
ctx,
network,
signatureAggregator,
ownerKey,
Expand Down
Loading

0 comments on commit 32c5f81

Please sign in to comment.