Skip to content

Commit

Permalink
chore: lint tests and sync for app, osmomath, tests, and wasmbinding (#…
Browse files Browse the repository at this point in the history
…5206)

* lint tests and sync: app, osmomath, tests, and wasmbinding

* add osmomath to lp_test

* sync
  • Loading branch information
faddat authored May 19, 2023
1 parent d26fc1d commit 174dcd8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/upgrades/v15/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (suite *UpgradeTestSuite) TestMigrateNextPoolIdAndCreatePool() {
gammKeeper := suite.App.GAMMKeeper
poolmanagerKeeper := suite.App.PoolManagerKeeper

nextPoolId := gammKeeper.GetNextPoolId(ctx)
nextPoolId := gammKeeper.GetNextPoolId(ctx) //nolint:staticcheck // we're using the deprecated version for testing.
suite.Require().Equal(expectedNextPoolId, nextPoolId)

// system under test.
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/e2e_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const (
// Environment variable name to skip the IBC tests
skipIBCEnv = "OSMOSIS_E2E_SKIP_IBC"
// Environment variable name to skip state sync testing
skipStateSyncEnv = "OSMOSIS_E2E_SKIP_STATE_SYNC"
skipStateSyncEnv = "OSMOSIS_E2E_SKIP_STATE_SYNC" //nolint:unused // this is used in the code
// Environment variable name to determine if this upgrade is a fork
forkHeightEnv = "OSMOSIS_E2E_FORK_HEIGHT"
// Environment variable name to skip cleaning up Docker resources in teardown
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ func (s *IntegrationTestSuite) TestConcentratedLiquidity() {
// Withdraw Position

// Withdraw Position parameters
var defaultLiquidityRemoval string = "1000"
defaultLiquidityRemoval := "1000"

chainA.WaitForNumHeights(2)

Expand Down
10 changes: 5 additions & 5 deletions tests/ibc-hooks/ibc_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ func (suite *HooksTestSuite) SetupCrosschainSwaps(chainName Chain) (sdk.AccAddre
ctx := chain.GetContext()

// Configuring two prefixes for the same channel here. This is so that we can test bad acks when the receiver can't handle the receiving addr
msg := fmt.Sprintf(`{
msg := `{
"modify_bech32_prefixes": {
"operations": [
{"operation": "set", "chain_name": "osmosis", "prefix": "osmo"},
Expand All @@ -742,7 +742,7 @@ func (suite *HooksTestSuite) SetupCrosschainSwaps(chainName Chain) (sdk.AccAddre
]
}
}
`)
`
_, err = contractKeeper.Execute(ctx, registryAddr, owner, []byte(msg), sdk.NewCoins())
suite.Require().NoError(err)

Expand Down Expand Up @@ -958,7 +958,7 @@ func (suite *HooksTestSuite) TestUnwrapToken() {

contractKeeper := wasmkeeper.NewDefaultPermissionKeeper(osmosisApp.WasmKeeper)

msg := fmt.Sprintf(`{
msg := `{
"modify_bech32_prefixes": {
"operations": [
{"operation": "set", "chain_name": "osmosis", "prefix": "osmo"},
Expand All @@ -968,7 +968,7 @@ func (suite *HooksTestSuite) TestUnwrapToken() {
]
}
}
`)
`
_, err := contractKeeper.Execute(ctx, registryAddr, owner, []byte(msg), sdk.NewCoins())
suite.Require().NoError(err)

Expand Down Expand Up @@ -1559,7 +1559,7 @@ func (suite *HooksTestSuite) TestCrosschainSwapsViaIBCMultiHop() {
// Now the swwap can actually execute on A via the callback and generate a new packet with the swapped token to B
packet, err = ibctesting.ParsePacketFromEvents(res.GetEvents())
suite.Require().NoError(err)
res = suite.RelayPacketNoAck(packet, AtoB)
_ = suite.RelayPacketNoAck(packet, AtoB)

balanceToken0After := osmosisAppB.BankKeeper.GetBalance(suite.chainB.GetContext(), accountB, token0ACB)
suite.Require().Equal(int64(1000), balanceToken0.Amount.Sub(balanceToken0After.Amount).Int64())
Expand Down
6 changes: 3 additions & 3 deletions wasmbinding/query_plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/query"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
proto "github.com/golang/protobuf/proto"
proto "github.com/golang/protobuf/proto" //nolint:staticcheck // we're intentionally using this deprecated package to be compatible with cosmos protos
"github.com/stretchr/testify/suite"
"github.com/tendermint/tendermint/crypto/ed25519"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
Expand Down Expand Up @@ -84,7 +84,7 @@ func (suite *StargateTestSuite) TestStargateQuerier() {
suite.NoError(err)
},
requestData: func() []byte {
queryrequest := gammv2types.QuerySpotPriceRequest{
queryrequest := gammv2types.QuerySpotPriceRequest{ //nolint:staticcheck // we're intentionally using this deprecated package for testing
PoolId: 1,
BaseAssetDenom: "bar",
QuoteAssetDenom: "uosmo",
Expand All @@ -94,7 +94,7 @@ func (suite *StargateTestSuite) TestStargateQuerier() {
return bz
},
checkResponseStruct: true,
responseProtoStruct: &gammv2types.QuerySpotPriceResponse{
responseProtoStruct: &gammv2types.QuerySpotPriceResponse{ //nolint:staticcheck // we're intentionally using this deprecated package for testing
SpotPrice: sdk.NewDecWithPrec(5, 1).String(),
},
},
Expand Down

0 comments on commit 174dcd8

Please sign in to comment.