diff --git a/tests/e2e/gov/deposits.go b/tests/e2e/gov/deposits.go index ebbbeccc4f6b..cf4b99b1ee7b 100644 --- a/tests/e2e/gov/deposits.go +++ b/tests/e2e/gov/deposits.go @@ -122,7 +122,7 @@ func (s *DepositTestSuite) TestQueryProposalAfterVotingPeriod() { s.Require().Contains(err.Error(), fmt.Sprintf("proposal %s doesn't exist", proposalID)) // query deposits - deposits := s.queryDeposits(val, proposalID, true, "proposal 3 doesn't exist") + deposits := s.queryDeposits(val, proposalID, true, fmt.Sprintf("proposal %s doesn't exist", proposalID)) s.Require().Nil(deposits) } diff --git a/tests/e2e/gov/query.go b/tests/e2e/gov/query.go index 145f25bd6c72..5a14e9025e96 100644 --- a/tests/e2e/gov/query.go +++ b/tests/e2e/gov/query.go @@ -23,7 +23,7 @@ func (s *E2ETestSuite) TestCmdParams() { { "json output", []string{fmt.Sprintf("--%s=json", flags.FlagOutput)}, - `{"voting_params":{"voting_period":"172800s"},"deposit_params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s"},"tally_params":{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"},"params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s","voting_period":"172800s","quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000","min_initial_deposit_ratio":"0.000000000000000000","burn_vote_quorum":false,"burn_proposal_deposit_prevote":false,"burn_vote_veto":true}}`, + `{"voting_params":{"voting_period":"172800s"},"deposit_params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s"},"tally_params":{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"},"params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s","voting_period":"172800s","quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000","min_initial_deposit_ratio":"0.000000000000000000","burn_vote_quorum":false,"burn_proposal_deposit_prevote":false,"burn_vote_veto":true,"min_deposit_ratio":"0.010000000000000000"}}`, }, { "text output", @@ -42,6 +42,7 @@ params: min_deposit: - amount: "10000000" denom: stake + min_deposit_ratio: "0.010000000000000000" min_initial_deposit_ratio: "0.000000000000000000" quorum: "0.334000000000000000" threshold: "0.500000000000000000" diff --git a/tests/e2e/gov/tx.go b/tests/e2e/gov/tx.go index f728701badb6..f97c2acc5d02 100644 --- a/tests/e2e/gov/tx.go +++ b/tests/e2e/gov/tx.go @@ -305,11 +305,23 @@ func (s *E2ETestSuite) TestNewCmdDeposit() { }, false, 2, }, + { + "fail deposit on existing proposal", + []string{ + "1", + sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)).String(), // 10stake -> insufficient min deposit amount + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + }, + false, 16, + }, { "deposit on existing proposal", []string{ "1", - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)).String(), // 10stake + sdk.NewCoin(s.cfg.BondDenom, v1.DefaultMinDepositTokens.Sub(sdk.NewInt(50))).String(), // slighty less than min initial deposit fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync),