From 8b1b16649a4a39ac2b2532084c6378e287032a47 Mon Sep 17 00:00:00 2001 From: jgo121 Date: Fri, 22 Sep 2023 17:52:54 +0800 Subject: [PATCH] Resolve staking endblock unit tests --- x/staking/abci_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/staking/abci_test.go b/x/staking/abci_test.go index 2afb9d0b..def5b2de 100644 --- a/x/staking/abci_test.go +++ b/x/staking/abci_test.go @@ -33,7 +33,7 @@ func TestItUpdatesTheValidatorSetBasedOnPendingValidators(t *testing.T) { // First checkings validatorSet := app.CustomStakingKeeper.GetValidatorSet(ctx) - require.Len(t, validatorSet, 0) + require.Len(t, validatorSet, 1) validatorSet = app.CustomStakingKeeper.GetPendingValidatorSet(ctx) require.Len(t, validatorSet, 1) @@ -41,7 +41,7 @@ func TestItUpdatesTheValidatorSetBasedOnPendingValidators(t *testing.T) { require.Len(t, updates, 1) validatorSet = app.CustomStakingKeeper.GetValidatorSet(ctx) - require.Len(t, validatorSet, 1) + require.Len(t, validatorSet, 2) validatorSet = app.CustomStakingKeeper.GetPendingValidatorSet(ctx) require.Len(t, validatorSet, 0) } @@ -52,7 +52,7 @@ func TestItDoesNotReturnUpdatesIfThereIsNoPending(t *testing.T) { // First checkings validatorSet := app.CustomStakingKeeper.GetValidatorSet(ctx) - require.Len(t, validatorSet, 0) + require.Len(t, validatorSet, 1) validatorSet = app.CustomStakingKeeper.GetPendingValidatorSet(ctx) require.Len(t, validatorSet, 0) @@ -60,7 +60,7 @@ func TestItDoesNotReturnUpdatesIfThereIsNoPending(t *testing.T) { require.Len(t, updates, 0) validatorSet = app.CustomStakingKeeper.GetValidatorSet(ctx) - require.Len(t, validatorSet, 0) + require.Len(t, validatorSet, 1) validatorSet = app.CustomStakingKeeper.GetPendingValidatorSet(ctx) require.Len(t, validatorSet, 0) }