@@ -6,17 +6,14 @@ import (
66
77 "github.com/stretchr/testify/require"
88
9- appmodulev2 "cosmossdk.io/core/appmodule/v2"
10- "cosmossdk.io/x/staking"
11-
129 "github.com/cosmos/cosmos-sdk/client"
13- codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
1410 "github.com/cosmos/cosmos-sdk/testutil"
1511 clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
1612 "github.com/cosmos/cosmos-sdk/types/module"
1713 testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil"
1814 "github.com/cosmos/cosmos-sdk/x/genutil"
1915 "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
16+ "github.com/cosmos/cosmos-sdk/x/staking"
2017)
2118
2219// An example exported genesis file from a 0.37 chain. Note that evidence
@@ -39,18 +36,18 @@ var v037Exported = `{
3936}`
4037
4138func TestValidateGenesis (t * testing.T ) {
42- cdc := testutilmod .MakeTestEncodingConfig (codectestutil. CodecOptions {}, genutil.AppModule {}).Codec
39+ cdc := testutilmod .MakeTestEncodingConfig (genutil.AppModule {}).Codec
4340 testCases := []struct {
4441 name string
4542 genesis string
4643 expErrStr string
47- genMM * module.Manager
44+ genMM module.BasicManager
4845 }{
4946 {
5047 "invalid json" ,
5148 `{"app_state": {x,}}` ,
5249 "error at offset 16: invalid character" ,
53- module .NewManagerFromMap ( nil ),
50+ module .NewBasicManager ( ),
5451 },
5552 {
5653 "invalid: missing module config in app_state" ,
@@ -61,15 +58,13 @@ func TestValidateGenesis(t *testing.T) {
6158 return string (bz )
6259 }(),
6360 "section is missing in the app_state" ,
64- module .NewManagerFromMap (map [string ]appmodulev2.AppModule {
65- "custommod" : staking .NewAppModule (cdc , nil , nil , nil ),
66- }),
61+ module .NewBasicManager (staking .NewAppModule (cdc , nil , nil , nil , nil )),
6762 },
6863 {
6964 "exported 0.37 genesis file" ,
7065 v037Exported ,
7166 "make sure that you have correctly migrated all CometBFT consensus params" ,
72- module .NewManagerFromMap ( nil ),
67+ module .NewBasicManager ( ),
7368 },
7469 {
7570 "valid 0.50 genesis file" ,
@@ -80,7 +75,7 @@ func TestValidateGenesis(t *testing.T) {
8075 return string (bz )
8176 }(),
8277 "" ,
83- module .NewManagerFromMap ( nil ),
78+ module .NewBasicManager ( ),
8479 },
8580 }
8681
0 commit comments