Skip to content

Commit

Permalink
tests: improve unjail tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek committed Dec 9, 2024
1 parent b65fc99 commit 928baa5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/integration/democracy.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ func (s *ConsumerDemocracyTestSuite) TestDemocracyMsgUpdateParams() {

func (s *ConsumerDemocracyTestSuite) TestDemocracyValidatorUnjail() {
stakingKeeper := s.consumerApp.GetTestStakingKeeper()
consumerKeeper := s.consumerApp.GetConsumerKeeper()

validators, err := stakingKeeper.GetAllValidators(s.consumerCtx())
s.Require().NoError(err)
Expand All @@ -258,8 +259,9 @@ func (s *ConsumerDemocracyTestSuite) TestDemocracyValidatorUnjail() {
}
}

// the actual test if unjailing works
err = stakingKeeper.GetValidatorSet().Unjail(s.consumerCtx(), consAddr)
// confirm unjail will not error and properly unjail
// in case of a consumer chain without standalone staking the call is a no-op
err = consumerKeeper.Unjail(s.consumerCtx(), consAddr)
s.Require().NoError(err)
s.consumerChain.NextBlock()

Expand Down

0 comments on commit 928baa5

Please sign in to comment.