Skip to content

Commit

Permalink
ci: test for staking unbond-validator (#3247)
Browse files Browse the repository at this point in the history
  • Loading branch information
fastfadingviolets committed Jul 31, 2024
1 parent 0252e99 commit 40ebe0b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/interchain/txs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import (
sdkmath "cosmossdk.io/math"

"github.com/cosmos/gaia/v19/tests/interchain/chainsuite"

stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
)

const txAmount = 1_000_000_000
Expand Down Expand Up @@ -316,6 +318,29 @@ func (s TxSuite) TestFeegrant() {
}
}

func (s *TxSuite) TestUnbondValidator() {
_, err := s.Chain.Validators[5].ExecTx(
s.GetContext(),
s.Chain.ValidatorWallets[5].Moniker,
"staking", "unbond-validator",
)
s.Require().NoError(err)
validator, err := s.Chain.StakingQueryValidator(s.GetContext(), s.Chain.ValidatorWallets[5].ValoperAddress)
s.Require().NoError(err)
s.Require().Equal(stakingtypes.Unbonding, validator.Status)

_, err = s.Chain.Validators[5].ExecTx(
s.GetContext(),
s.Chain.ValidatorWallets[5].Moniker,
"slashing", "unjail",
)
s.Require().NoError(err)

validator, err = s.Chain.StakingQueryValidator(s.GetContext(), s.Chain.ValidatorWallets[5].ValoperAddress)
s.Require().NoError(err)
s.Require().Equal(stakingtypes.Bonded, validator.Status)
}

func (s *TxSuite) TestMultisig() {
pubkey1, _, err := s.Chain.Validators[1].ExecBin(s.GetContext(), "keys", "show", s.Chain.ValidatorWallets[1].Moniker, "--pubkey", "--keyring-backend", "test")
s.Require().NoError(err)
Expand Down

0 comments on commit 40ebe0b

Please sign in to comment.