Skip to content

Commit

Permalink
Fixed the error build when run go test
Browse files Browse the repository at this point in the history
  • Loading branch information
TuSoict committed Nov 4, 2024
1 parent 2f33b29 commit d47d8ea
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions custom/gov/keeper/deposit_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package keeper

import (
"fmt"
"testing"

"github.com/classic-terra/core/v3/custom/gov/types/v2lunc1"
Expand Down Expand Up @@ -117,13 +116,16 @@ func TestAddDeposits(t *testing.T) {
// Test deposit iterator
// NOTE order of deposits is determined by the addresses
deposits := govKeeper.GetAllDeposits(ctx)
fmt.Printf("deposits: %v\n", deposits)
require.Len(t, deposits, 2)
require.Equal(t, deposits, govKeeper.GetDeposits(ctx, proposalID))
require.Equal(t, addr1.String(), deposits[0].Depositor)
require.Equal(t, amountDeposit1.Add(amountDeposit2...), sdk.NewCoins(deposits[0].Amount...))
require.Equal(t, addr2.String(), deposits[1].Depositor)
require.Equal(t, amountDeposit1, sdk.NewCoins(deposits[1].Amount...))
for _, deposit := range deposits {
if deposit.Depositor == addr1.String() {
require.Equal(t, amountDeposit1.Add(amountDeposit2...), sdk.NewCoins(deposit.Amount...))
} else {
require.Equal(t, addr2.String(), deposit.Depositor)
require.Equal(t, amountDeposit1, sdk.NewCoins(deposit.Amount...))
}
}

// Test Refund Deposits
deposit, found = govKeeper.GetDeposit(ctx, proposalID, addr2)
Expand Down

0 comments on commit d47d8ea

Please sign in to comment.