Skip to content

Commit

Permalink
chore: apply code style suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
hallazzang committed Jul 25, 2024
1 parent 05b8942 commit 8b8ae1b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions x/tickers/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func (s *KeeperTestSuite) TestQueryTicker() {
_, err := s.msgServer.RegisterTicker(s.Ctx, types.NewMsgRegisterTicker(s.authority, "umilk", "MILK"))
s.Require().NoError(err)

for _, tc := range []struct {
testCases := []struct {
name string
req *types.QueryTickerRequest
expectedErr string
Expand All @@ -36,7 +36,8 @@ func (s *KeeperTestSuite) TestQueryTicker() {
"rpc error: code = NotFound desc = ticker for denom uatom not registered",
nil,
},
} {
}
for _, tc := range testCases {
s.Run(tc.name, func() {
resp, err := s.queryServer.Ticker(s.Ctx, tc.req)
if tc.expectedErr == "" {
Expand All @@ -56,7 +57,7 @@ func (s *KeeperTestSuite) TestQueryDenoms() {
_, err = s.msgServer.RegisterTicker(s.Ctx, types.NewMsgRegisterTicker(s.authority, "umilk2", "MILK"))
s.Require().NoError(err)

for _, tc := range []struct {
testCases := []struct {
name string
req *types.QueryDenomsRequest
expectedErr string
Expand Down Expand Up @@ -86,7 +87,8 @@ func (s *KeeperTestSuite) TestQueryDenoms() {
fmt.Println(resp.Denoms)
},
},
} {
}
for _, tc := range testCases {
s.Run(tc.name, func() {
resp, err := s.queryServer.Denoms(s.Ctx, tc.req)
if tc.expectedErr == "" {
Expand Down
5 changes: 3 additions & 2 deletions x/tickers/types/ticker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func TestValidateTicker(t *testing.T) {
for _, tc := range []struct {
testCases := []struct {
name string
ticker string
expectedErr string
Expand Down Expand Up @@ -39,7 +39,8 @@ func TestValidateTicker(t *testing.T) {
"WHATALONGTICKER",
"ticker too long",
},
} {
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
err := types.ValidateTicker(tc.ticker)
if tc.expectedErr == "" {
Expand Down

0 comments on commit 8b8ae1b

Please sign in to comment.