Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
atheeshp committed Jan 7, 2022
1 parent 6ad9160 commit fac4cad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 1 addition & 3 deletions x/distribution/client/testutil/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,5 @@ func TestGRPCQueryTestSuite(t *testing.T) {
}

func TestWithdrawAllSuite(t *testing.T) {
cfg1 := network.DefaultConfig()
cfg1.NumValidators = 2
suite.Run(t, NewWithdrawAllTestSuite(cfg1))
suite.Run(t, new(WithdrawAllTestSuite))
}
13 changes: 9 additions & 4 deletions x/distribution/client/testutil/withdraw_all_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ type WithdrawAllTestSuite struct {
network *network.Network
}

func NewWithdrawAllTestSuite(cfg network.Config) *IntegrationTestSuite {
return &IntegrationTestSuite{cfg: cfg}
}

func (s *WithdrawAllTestSuite) SetupTest() {
cfg := network.DefaultConfig()
cfg.NumValidators = 2
s.cfg = cfg
s.T().Log("setting up integration test suite")
network, err := network.New(s.T(), s.T().TempDir(), s.cfg)
s.Require().NoError(err)
Expand All @@ -37,6 +36,12 @@ func (s *WithdrawAllTestSuite) SetupTest() {
s.Require().NoError(err)
}

// TearDownTest cleans up the curret test network after _each_ test.
func (s *WithdrawAllTestSuite) TearDownTest() {
s.T().Log("tearing down integration test suite")
s.network.Cleanup()
}

func (s *WithdrawAllTestSuite) TestNewWithdrawAllRewardsGenerateOnly() {
require := s.Require()
val := s.network.Validators[0]
Expand Down

0 comments on commit fac4cad

Please sign in to comment.