Unverified Commit fe9a701c authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub
Browse files

Move osmoassert into osmoutils, remove osmoutils twap dependence (backport #3817) (#3819)

* Move osmoassert into osmoutils, remove osmoutils twap dependence (#3817)

* Move osmoassert into osmoutils

* Remove twaptypes dependence

* Add changelog

(cherry picked from commit 4f04e735

)

# Conflicts:
#	CHANGELOG.md
#	x/twap/logic_test.go
#	x/twap/strategy_test.go

* Fix conflicts

Co-authored-by: default avatarDev Ojha <ValarDragon@users.noreply.github.com>
Co-authored-by: default avatarDev Ojha <dojha@berkeley.edu>
Showing with 24 additions and 23 deletions
+24 -23
......@@ -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
......
......@@ -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() {
......
......@@ -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,
......
......@@ -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"
)
......
......@@ -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"
......
......@@ -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"
)
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
)
......
......@@ -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"
)
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
)
......
......@@ -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"
......
......@@ -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"
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment