-
Notifications
You must be signed in to change notification settings - Fork 625
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(connection): migrate connection params
- Loading branch information
1 parent
d61886d
commit 812e67f
Showing
21 changed files
with
793 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package keeper_test | ||
|
||
import ( | ||
"github.com/cosmos/ibc-go/v7/modules/core/03-connection/keeper" | ||
"github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" | ||
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" | ||
) | ||
|
||
// TestMigrateParams tests that the params for the connection are properly migrated | ||
func (suite *KeeperTestSuite) TestMigrateParams() { | ||
testCases := []struct { | ||
name string | ||
malleate func() | ||
expectedParams types.Params | ||
}{ | ||
{ | ||
"success: default params", | ||
func() { | ||
params := types.DefaultParams() | ||
subspace := suite.chainA.GetSimApp().GetSubspace(ibcexported.ModuleName) | ||
subspace.SetParamSet(suite.chainA.GetContext(), ¶ms) // set params | ||
}, | ||
types.DefaultParams(), | ||
}, | ||
} | ||
|
||
for _, tc := range testCases { | ||
tc := tc | ||
suite.Run(tc.name, func() { | ||
suite.SetupTest() // reset | ||
|
||
tc.malleate() | ||
|
||
ctx := suite.chainA.GetContext() | ||
migrator := keeper.NewMigrator(suite.chainA.GetSimApp().IBCKeeper.ConnectionKeeper) | ||
err := migrator.MigrateParams(ctx) | ||
suite.Require().NoError(err) | ||
|
||
params := suite.chainA.GetSimApp().IBCKeeper.ConnectionKeeper.GetParams(ctx) | ||
suite.Require().Equal(tc.expectedParams, params) | ||
}) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.