Skip to content

Commit

Permalink
[CORE-538] Fix CLI tests to correctly generate module address (#981)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcwik committed Jan 18, 2024
1 parent 62fc6a4 commit 126a7e7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
11 changes: 4 additions & 7 deletions protocol/testutil/bank/bank_helpers.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package bank

import (
sdkmath "cosmossdk.io/math"
"fmt"

sdkmath "cosmossdk.io/math"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/testutil"
"github.com/cosmos/cosmos-sdk/testutil/network"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
Expand All @@ -23,12 +25,7 @@ func GetModuleAccUsdcBalance(
balance int64,
err error,
) {
moduleAddress, err := codec.InterfaceRegistry().SigningContext().AddressCodec().BytesToString(
[]byte(moduleName),
)
if err != nil {
return 0, err
}
moduleAddress := authtypes.NewModuleAddress(moduleName)
resp, err := testutil.GetRequest(fmt.Sprintf(
"%s/cosmos/bank/v1beta1/balances/%s",
val.APIAddress,
Expand Down
2 changes: 0 additions & 2 deletions protocol/x/clob/client/cli/cancel_order_cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ func (s *CancelOrderIntegrationTestSuite) SetupTest() {
// The subaccounts are then queried and assertions are performed on their QuoteBalance and PerpetualPositions.
// The account which places the orders is also the validator's AccAddress.
func (s *CancelOrderIntegrationTestSuite) TestCLICancelPendingOrder() {
s.T().Skip("TODO(CORE-538): Resolve why bank balance for subaccounts module is not found.")
val := s.network.Validators[0]
ctx := val.ClientCtx

Expand Down Expand Up @@ -294,7 +293,6 @@ func (s *CancelOrderIntegrationTestSuite) TestCLICancelPendingOrder() {
// The subaccounts are then queried and assertions are performed on their QuoteBalance and PerpetualPositions.
// The account which places the orders is also the validator's AccAddress.
func (s *CancelOrderIntegrationTestSuite) TestCLICancelMatchingOrders() {
s.T().Skip("TODO(CORE-538): Resolve why bank balance for subaccounts module is not found.")
val := s.network.Validators[0]
ctx := val.ClientCtx

Expand Down
1 change: 0 additions & 1 deletion protocol/x/clob/client/cli/liquidations_cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ type LiquidationsIntegrationTestSuite struct {
}

func TestLiquidationOrderIntegrationTestSuite(t *testing.T) {
t.Skip("TODO(CORE-538): Resolve why bank balance for subaccounts module is not found.")
// Deterministic Mnemonic.
validatorMnemonic := constants.AliceMnenomic

Expand Down
1 change: 0 additions & 1 deletion protocol/x/clob/client/cli/place_order_cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ type PlaceOrderIntegrationTestSuite struct {
}

func TestPlaceOrderIntegrationTestSuite(t *testing.T) {
t.Skip("TODO(CORE-538): Resolve why bank balance for subaccounts module is not found.")
// Deterministic Mnemonic.
validatorMnemonic := constants.AliceMnenomic

Expand Down

0 comments on commit 126a7e7

Please sign in to comment.