Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentysc committed Dec 1, 2024
1 parent 5205c3d commit 4edfc49
Show file tree
Hide file tree
Showing 35 changed files with 937 additions and 942 deletions.
12 changes: 6 additions & 6 deletions projection/account/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
account_view "github.com/crypto-com/chain-indexing/projection/account/view"
"github.com/crypto-com/chain-indexing/usecase/coin"
event_usecase "github.com/crypto-com/chain-indexing/usecase/event"
"github.com/stretchr/testify/assert"
testify_mock "github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
)

func NewAccountProjection(rdbConn rdb.Conn, client cosmosapp.Client) *account.Account {
Expand Down Expand Up @@ -118,7 +118,7 @@ func TestAccount_HandleEvents(t *testing.T) {
coin.Coins{
coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
nil,
Expand All @@ -145,7 +145,7 @@ func TestAccount_HandleEvents(t *testing.T) {
Balance: coin.Coins{
{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -194,7 +194,7 @@ func TestAccount_HandleEvents(t *testing.T) {
coin.Coins{
coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(1000),
Amount: coin.NewInt(1000),
},
},
nil,
Expand All @@ -212,7 +212,7 @@ func TestAccount_HandleEvents(t *testing.T) {
Balance: coin.Coins{
{
Denom: "Denom",
Amount: *coin.NewInt(1000),
Amount: coin.NewInt(1000),
},
},
},
Expand All @@ -237,7 +237,7 @@ func TestAccount_HandleEvents(t *testing.T) {

projection := NewAccountProjection(mockRDbConn, mockClient)
err := projection.HandleEvents(1, tc.Events)
require.NoError(t, err)
assert.NoError(t, err)

for _, m := range mocks {
m.AssertExpectations(t)
Expand Down
76 changes: 38 additions & 38 deletions projection/account_message/account_message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"github.com/crypto-com/chain-indexing/usecase/model"
usecase_model "github.com/crypto-com/chain-indexing/usecase/model"
ibc_model "github.com/crypto-com/chain-indexing/usecase/model/ibc"
"github.com/stretchr/testify/assert"
testify_mock "github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
)

func NewAccountMessageProjection(rdbConn rdb.Conn) *account_message.AccountMessage {
Expand Down Expand Up @@ -101,7 +101,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -173,7 +173,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -225,7 +225,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand All @@ -236,7 +236,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -311,7 +311,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand All @@ -322,7 +322,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -492,7 +492,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -555,7 +555,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -608,7 +608,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -670,7 +670,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -721,7 +721,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -780,7 +780,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -844,7 +844,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
InitialDeposit: coin.Coins{
{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -918,7 +918,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
InitialDeposit: coin.Coins{
{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -975,15 +975,15 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
ProposerAddress: "ProposerAddress",
InitialDeposit: coin.Coins{
{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -1049,15 +1049,15 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
ProposerAddress: "ProposerAddress",
InitialDeposit: coin.Coins{
{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -1115,7 +1115,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
InitialDeposit: coin.Coins{
{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -1182,7 +1182,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
InitialDeposit: coin.Coins{
{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -1234,7 +1234,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -1294,7 +1294,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
Amount: coin.Coins{
{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -1459,7 +1459,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
TendermintPubkey: "TendermintPubkey",
Amount: coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -1531,7 +1531,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
TendermintPubkey: "TendermintPubkey",
Amount: coin.Coin{
Denom: "Denom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
},
},
Expand Down Expand Up @@ -1693,11 +1693,11 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
}),
Amount: coin.Coin{
Denom: "AmountDenom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
AutoClaimedRewards: coin.Coin{
Denom: "AutoClaimedRewardsDenom",
Amount: *coin.NewInt(1000),
Amount: coin.NewInt(1000),
},
DelegatorAddress: "DelegatorAddress",
ValidatorAddress: "ValidatorAddress",
Expand Down Expand Up @@ -1755,11 +1755,11 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
},
Amount: coin.Coin{
Denom: "AmountDenom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
AutoClaimedRewards: coin.Coin{
Denom: "AutoClaimedRewardsDenom",
Amount: *coin.NewInt(1000),
Amount: coin.NewInt(1000),
},
DelegatorAddress: "DelegatorAddress",
ValidatorAddress: "ValidatorAddress",
Expand Down Expand Up @@ -1808,11 +1808,11 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
}),
Amount: coin.Coin{
Denom: "AmountDenom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
AutoClaimedRewards: coin.Coin{
Denom: "AutoClaimedRewardsDenom",
Amount: *coin.NewInt(1000),
Amount: coin.NewInt(1000),
},
DelegatorAddress: "DelegatorAddress",
ValidatorAddress: "ValidatorAddress",
Expand Down Expand Up @@ -1871,11 +1871,11 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
},
Amount: coin.Coin{
Denom: "AmountDenom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
AutoClaimedRewards: coin.Coin{
Denom: "AutoClaimedRewardsDenom",
Amount: *coin.NewInt(1000),
Amount: coin.NewInt(1000),
},
DelegatorAddress: "DelegatorAddress",
ValidatorAddress: "ValidatorAddress",
Expand Down Expand Up @@ -1925,11 +1925,11 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
}),
Amount: coin.Coin{
Denom: "AmountDenom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
AutoClaimedRewards: coin.Coin{
Denom: "AutoClaimedRewardsDenom",
Amount: *coin.NewInt(1000),
Amount: coin.NewInt(1000),
},
DelegatorAddress: "DelegatorAddress",
ValidatorSrcAddress: "ValidatorSrcAddress",
Expand Down Expand Up @@ -1988,11 +1988,11 @@ func TestAccountMessage_HandleEvents(t *testing.T) {
},
Amount: coin.Coin{
Denom: "AmountDenom",
Amount: *coin.NewInt(100),
Amount: coin.NewInt(100),
},
AutoClaimedRewards: coin.Coin{
Denom: "AutoClaimedRewardsDenom",
Amount: *coin.NewInt(1000),
Amount: coin.NewInt(1000),
},
DelegatorAddress: "DelegatorAddress",
ValidatorSrcAddress: "ValidatorSrcAddress",
Expand Down Expand Up @@ -5001,7 +5001,7 @@ func TestAccountMessage_HandleEvents(t *testing.T) {

projection := NewAccountMessageProjection(mockRDbConn)
err := projection.HandleEvents(1, tc.Events)
require.NoError(t, err)
assert.NoError(t, err)

for _, m := range mocks {
m.AssertExpectations(t)
Expand Down
Loading

0 comments on commit 4edfc49

Please sign in to comment.