Skip to content

Commit ddaa3c5

Browse files
author
Alessio Treglia
authored
types: tests -> test suites migration (#7405)
1 parent 489599b commit ddaa3c5

17 files changed

+675
-562
lines changed

testutil/testdata/test_tx.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ func (msg *TestMsg) GetSignBytes() []byte {
5454
func (msg *TestMsg) GetSigners() []sdk.AccAddress {
5555
addrs := make([]sdk.AccAddress, len(msg.Signers))
5656
for i, in := range msg.Signers {
57-
addr, _ := sdk.AccAddressFromBech32(in)
57+
addr, err := sdk.AccAddressFromBech32(in)
58+
if err != nil {
59+
panic(err)
60+
}
61+
5862
addrs[i] = addr
5963
}
6064

types/address_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ func TestAddressTestSuite(t *testing.T) {
2626
suite.Run(t, new(addressTestSuite))
2727
}
2828

29+
func (s *addressTestSuite) SetupSuite() {
30+
s.T().Parallel()
31+
}
32+
2933
var invalidStrs = []string{
3034
"hello, world!",
3135
"0xAA",

types/coin_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ func TestCoinTestSuite(t *testing.T) {
2424
suite.Run(t, new(coinTestSuite))
2525
}
2626

27+
func (s *coinTestSuite) SetupSuite() {
28+
s.T().Parallel()
29+
}
30+
2731
// ----------------------------------------------------------------------------
2832
// Coin tests
2933

@@ -840,7 +844,7 @@ func (s *coinTestSuite) TestNewCoins() {
840844
for _, tt := range tests {
841845
if tt.wantPanic {
842846
s.Require().Panics(func() { sdk.NewCoins(tt.coins...) })
843-
return
847+
continue
844848
}
845849
got := sdk.NewCoins(tt.coins...)
846850
s.Require().True(got.IsEqual(tt.want))

0 commit comments

Comments
 (0)