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

types: tests -> test suites migration #7405

Merged
merged 14 commits into from
Sep 29, 2020
6 changes: 5 additions & 1 deletion testutil/testdata/test_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ func (msg *TestMsg) GetSignBytes() []byte {
func (msg *TestMsg) GetSigners() []sdk.AccAddress {
addrs := make([]sdk.AccAddress, len(msg.Signers))
for i, in := range msg.Signers {
addr, _ := sdk.AccAddressFromBech32(in)
addr, err := sdk.AccAddressFromBech32(in)
if err != nil {
panic(err)
}

alessio marked this conversation as resolved.
Show resolved Hide resolved
addrs[i] = addr
}

Expand Down
4 changes: 4 additions & 0 deletions types/address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ func TestAddressTestSuite(t *testing.T) {
suite.Run(t, new(addressTestSuite))
}

func (s *addressTestSuite) SetupSuite() {
s.T().Parallel()
}

var invalidStrs = []string{
"hello, world!",
"0xAA",
Expand Down
6 changes: 5 additions & 1 deletion types/coin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ func TestCoinTestSuite(t *testing.T) {
suite.Run(t, new(coinTestSuite))
}

func (s *coinTestSuite) SetupSuite() {
s.T().Parallel()
}

// ----------------------------------------------------------------------------
// Coin tests

Expand Down Expand Up @@ -840,7 +844,7 @@ func (s *coinTestSuite) TestNewCoins() {
for _, tt := range tests {
if tt.wantPanic {
s.Require().Panics(func() { sdk.NewCoins(tt.coins...) })
return
continue
alessio marked this conversation as resolved.
Show resolved Hide resolved
}
got := sdk.NewCoins(tt.coins...)
s.Require().True(got.IsEqual(tt.want))
Expand Down
Loading