Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(distribution): CLI tests using Tendermint Mock #13692

Merged
merged 16 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions tests/e2e/distribution/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,16 @@ import (
"testing"

"github.com/stretchr/testify/suite"

"github.com/cosmos/cosmos-sdk/x/distribution/client/testutil"
)

func TestIntegrationTestSuite(t *testing.T) {
suite.Run(t, new(testutil.IntegrationTestSuite))
suite.Run(t, new(IntegrationTestSuite))
}

func TestGRPCQueryTestSuite(t *testing.T) {
suite.Run(t, new(testutil.GRPCQueryTestSuite))
suite.Run(t, new(GRPCQueryTestSuite))
}

func TestWithdrawAllSuite(t *testing.T) {
suite.Run(t, new(testutil.WithdrawAllTestSuite))
suite.Run(t, new(WithdrawAllTestSuite))
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package testutil
package distribution
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I am confused. Given that it uses depinject, isn't it more an integration test than an e2e test?
cc @kocubinski


import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package testutil
package distribution

import (
"encoding/hex"
Expand All @@ -16,6 +16,7 @@ import (
"github.com/cosmos/cosmos-sdk/testutil/network"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/distribution/client/cli"
distrclitestutil "github.com/cosmos/cosmos-sdk/x/distribution/client/testutil"
"github.com/cosmos/cosmos-sdk/x/distribution/testutil"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
Expand Down Expand Up @@ -557,7 +558,7 @@ func (s *IntegrationTestSuite) TestNewWithdrawRewardsCmd() {
clientCtx := val.ClientCtx

_, _ = s.network.WaitForHeightWithTimeout(10, time.Minute)
bz, err := MsgWithdrawDelegatorRewardExec(clientCtx, tc.valAddr, tc.args...)
bz, err := distrclitestutil.MsgWithdrawDelegatorRewardExec(clientCtx, tc.valAddr, tc.args...)
if tc.expectErr {
s.Require().Error(err)
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package testutil
package distribution

import (
"fmt"
Expand Down
Loading