diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d0f375f6f9..cb9bf3aa904 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,6 +70,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### API breaks * [#3763](https://github.com/osmosis-labs/osmosis/pull/3763) Move binary search and error tolerance code from `osmoutils` into `osmomath` +* [#3817](https://github.com/osmosis-labs/osmosis/pull/3817) Move osmoassert from `app/apptesting/osmoassert` to `osmoutils/osmoassert`. + ### Bug fixes diff --git a/osmoutils/module_account_test.go b/osmoutils/module_account_test.go index 1166f0b0a2b..cad3d5633b8 100644 --- a/osmoutils/module_account_test.go +++ b/osmoutils/module_account_test.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/address" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" "github.com/osmosis-labs/osmosis/v13/osmoutils" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" ) func (s *TestSuite) TestCreateModuleAccount() { diff --git a/app/apptesting/osmoassert/assertions.go b/osmoutils/osmoassert/assertions.go similarity index 100% rename from app/apptesting/osmoassert/assertions.go rename to osmoutils/osmoassert/assertions.go diff --git a/osmoutils/store_helper_test.go b/osmoutils/store_helper_test.go index f059576767a..67333b3ac1a 100644 --- a/osmoutils/store_helper_test.go +++ b/osmoutils/store_helper_test.go @@ -16,10 +16,9 @@ import ( paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" "github.com/osmosis-labs/osmosis/v13/osmoutils" "github.com/osmosis-labs/osmosis/v13/osmoutils/noapptest" - twaptypes "github.com/osmosis-labs/osmosis/v13/x/twap/types" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" ) // We need to setup a test suite with account keeper @@ -800,7 +799,7 @@ func (s *TestSuite) TestMustGet() { expectPanic: true, }, - "invalid proto Dec vs TwapRecord- error": { + "invalid proto Dec vs AuthParams- error": { preSetKeyValues: map[string]proto.Message{ keyA: &sdk.DecProto{Dec: sdk.OneDec()}, }, @@ -809,7 +808,7 @@ func (s *TestSuite) TestMustGet() { keyA: &sdk.DecProto{Dec: sdk.OneDec()}, }, - actualResultProto: &twaptypes.TwapRecord{}, + actualResultProto: &authtypes.Params{}, expectPanic: true, }, @@ -884,7 +883,7 @@ func (s *TestSuite) TestGet() { expectErr: false, }, - "invalid proto Dec vs TwapRecord - found but Unmarshal err": { + "invalid proto Dec vs AuthParams - found but Unmarshal err": { preSetKeyValues: map[string]proto.Message{ keyA: &sdk.DecProto{Dec: sdk.OneDec()}, }, @@ -893,7 +892,7 @@ func (s *TestSuite) TestGet() { keyA: &sdk.DecProto{Dec: sdk.OneDec()}, }, - actualResultProto: &twaptypes.TwapRecord{}, + actualResultProto: &authtypes.Params{}, expectFound: true, @@ -951,13 +950,13 @@ func (s *TestSuite) TestMustSet() { actualResultProto: &sdk.DecProto{}, }, - "basic valid TwapRecord test": { + "basic valid AuthParams test": { setKey: keyA, - setValue: &twaptypes.TwapRecord{ - PoolId: 2, + setValue: &authtypes.Params{ + MaxMemoCharacters: 600, }, - actualResultProto: &twaptypes.TwapRecord{}, + actualResultProto: &authtypes.Params{}, }, "invalid set value": { setKey: keyA, diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index bc6331cb35a..5f522b25fa5 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -16,8 +16,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" coretypes "github.com/tendermint/tendermint/rpc/core/types" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" appparams "github.com/osmosis-labs/osmosis/v13/app/params" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" "github.com/osmosis-labs/osmosis/v13/tests/e2e/configurer/config" "github.com/osmosis-labs/osmosis/v13/tests/e2e/initialization" ) diff --git a/x/gamm/keeper/pool_service_test.go b/x/gamm/keeper/pool_service_test.go index 23a67796f6e..e5648541967 100644 --- a/x/gamm/keeper/pool_service_test.go +++ b/x/gamm/keeper/pool_service_test.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/balancer" balancertypes "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/balancer" "github.com/osmosis-labs/osmosis/v13/x/gamm/types" diff --git a/x/gamm/pool-models/balancer/pool_suite_test.go b/x/gamm/pool-models/balancer/pool_suite_test.go index 9bd8ad3a2f1..977c11e174a 100644 --- a/x/gamm/pool-models/balancer/pool_suite_test.go +++ b/x/gamm/pool-models/balancer/pool_suite_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/suite" "github.com/osmosis-labs/osmosis/v13/app/apptesting" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" v10 "github.com/osmosis-labs/osmosis/v13/app/upgrades/v10" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/balancer" "github.com/osmosis-labs/osmosis/v13/x/gamm/types" ) diff --git a/x/gamm/pool-models/balancer/pool_test.go b/x/gamm/pool-models/balancer/pool_test.go index 0ff0e56fdea..0d37da27ded 100644 --- a/x/gamm/pool-models/balancer/pool_test.go +++ b/x/gamm/pool-models/balancer/pool_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" "github.com/osmosis-labs/osmosis/osmomath" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/balancer" "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/internal/test_helpers" "github.com/osmosis-labs/osmosis/v13/x/gamm/types" diff --git a/x/gamm/pool-models/stableswap/amm_test.go b/x/gamm/pool-models/stableswap/amm_test.go index ea7590d7579..26cdc0df337 100644 --- a/x/gamm/pool-models/stableswap/amm_test.go +++ b/x/gamm/pool-models/stableswap/amm_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/suite" "github.com/osmosis-labs/osmosis/osmomath" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" sdkrand "github.com/osmosis-labs/osmosis/v13/simulation/simtypes/random" "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/internal/cfmm_common" "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/internal/test_helpers" diff --git a/x/gamm/pool-models/stableswap/pool_test.go b/x/gamm/pool-models/stableswap/pool_test.go index 0c68445bada..b97f82b786d 100644 --- a/x/gamm/pool-models/stableswap/pool_test.go +++ b/x/gamm/pool-models/stableswap/pool_test.go @@ -10,7 +10,7 @@ import ( "github.com/tendermint/tendermint/crypto/ed25519" "github.com/osmosis-labs/osmosis/osmomath" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" "github.com/osmosis-labs/osmosis/v13/x/gamm/pool-models/internal/cfmm_common" "github.com/osmosis-labs/osmosis/v13/x/gamm/types" ) diff --git a/x/mint/keeper/genesis_test.go b/x/mint/keeper/genesis_test.go index 2bdeb09d160..74439b88ec2 100644 --- a/x/mint/keeper/genesis_test.go +++ b/x/mint/keeper/genesis_test.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" "github.com/osmosis-labs/osmosis/v13/x/mint/keeper" "github.com/osmosis-labs/osmosis/v13/x/mint/types" ) diff --git a/x/mint/keeper/hooks_test.go b/x/mint/keeper/hooks_test.go index 0357831b24b..503d7a3837d 100644 --- a/x/mint/keeper/hooks_test.go +++ b/x/mint/keeper/hooks_test.go @@ -7,7 +7,7 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" osmoapp "github.com/osmosis-labs/osmosis/v13/app" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" "github.com/osmosis-labs/osmosis/v13/x/mint/keeper" "github.com/osmosis-labs/osmosis/v13/x/mint/types" diff --git a/x/mint/keeper/keeper_test.go b/x/mint/keeper/keeper_test.go index c1d5b124016..0c8ccf5cc1b 100644 --- a/x/mint/keeper/keeper_test.go +++ b/x/mint/keeper/keeper_test.go @@ -14,7 +14,7 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/osmosis-labs/osmosis/v13/app/apptesting" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" "github.com/osmosis-labs/osmosis/v13/x/mint/keeper" "github.com/osmosis-labs/osmosis/v13/x/mint/types" poolincentivestypes "github.com/osmosis-labs/osmosis/v13/x/pool-incentives/types" diff --git a/x/twap/keeper_test.go b/x/twap/keeper_test.go index f2c37d87f76..7f2f6e3053a 100644 --- a/x/twap/keeper_test.go +++ b/x/twap/keeper_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/suite" "github.com/osmosis-labs/osmosis/v13/app/apptesting" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" "github.com/osmosis-labs/osmosis/v13/x/twap" "github.com/osmosis-labs/osmosis/v13/x/twap/types" ) diff --git a/x/twap/logic_test.go b/x/twap/logic_test.go index 243bb082589..19ff959072c 100644 --- a/x/twap/logic_test.go +++ b/x/twap/logic_test.go @@ -9,8 +9,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" "github.com/osmosis-labs/osmosis/v13/osmoutils" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" gammtypes "github.com/osmosis-labs/osmosis/v13/x/gamm/types" "github.com/osmosis-labs/osmosis/v13/x/twap" "github.com/osmosis-labs/osmosis/v13/x/twap/types" diff --git a/x/twap/types/utils_test.go b/x/twap/types/utils_test.go index b2af7f12959..b784f37a985 100644 --- a/x/twap/types/utils_test.go +++ b/x/twap/types/utils_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/osmosis-labs/osmosis/v13/app/apptesting/osmoassert" + "github.com/osmosis-labs/osmosis/v13/osmoutils/osmoassert" "github.com/osmosis-labs/osmosis/v13/x/gamm/types" )