-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(tests/integration): Migrate mint and protocolpool integratio…
…n tests to server v2 (#22859)
- Loading branch information
1 parent
256ec4f
commit 6152260
Showing
6 changed files
with
228 additions
and
223 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package mint | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
"cosmossdk.io/depinject" | ||
"cosmossdk.io/log" | ||
_ "cosmossdk.io/x/accounts" // import as blank for app wiring | ||
_ "cosmossdk.io/x/bank" // import as blank for app wiring | ||
_ "cosmossdk.io/x/consensus" // import as blank for app wiring | ||
_ "cosmossdk.io/x/mint" // import as blank for app wiring | ||
"cosmossdk.io/x/mint/types" | ||
_ "cosmossdk.io/x/staking" // import as blank for app wiring | ||
|
||
"github.com/cosmos/cosmos-sdk/tests/integration/v2" | ||
"github.com/cosmos/cosmos-sdk/testutil/configurator" | ||
_ "github.com/cosmos/cosmos-sdk/x/auth" // import as blank for app wiring | ||
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" | ||
_ "github.com/cosmos/cosmos-sdk/x/auth/tx/config" // import as blank for app wiring | ||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" | ||
_ "github.com/cosmos/cosmos-sdk/x/genutil" // import as blank for app wiring | ||
) | ||
|
||
func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { | ||
var accountKeeper authkeeper.AccountKeeper | ||
|
||
moduleConfigs := []configurator.ModuleOption{ | ||
configurator.AccountsModule(), | ||
configurator.AuthModule(), | ||
configurator.BankModule(), | ||
configurator.StakingModule(), | ||
configurator.TxModule(), | ||
configurator.ValidateModule(), | ||
configurator.ConsensusModule(), | ||
configurator.GenutilModule(), | ||
configurator.MintModule(), | ||
} | ||
|
||
startupCfg := integration.DefaultStartUpConfig(t) | ||
app, err := integration.NewApp( | ||
depinject.Configs(configurator.NewAppV2Config(moduleConfigs...), depinject.Supply(log.NewNopLogger())), | ||
startupCfg, &accountKeeper) | ||
require.NoError(t, err) | ||
|
||
ctx := app.StateLatestContext(t) | ||
acc := accountKeeper.GetAccount(ctx, authtypes.NewModuleAddress(types.ModuleName)) | ||
require.NotNil(t, acc) | ||
} |
Oops, something went wrong.