-
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.
feat: add x/nft app wiring integration tests (#12220)
* feat: add x/nft app wiring integration tests * updates * feedback
- Loading branch information
1 parent
7688ce6
commit 8111a05
Showing
5 changed files
with
99 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
package testutil | ||
|
||
import ( | ||
_ "embed" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
"github.com/stretchr/testify/suite" | ||
|
||
"github.com/cosmos/cosmos-sdk/testutil/network" | ||
"github.com/cosmos/cosmos-sdk/x/nft/testutil" | ||
) | ||
|
||
func TestIntegrationTestSuite(t *testing.T) { | ||
cfg := network.DefaultConfig() | ||
cfg, err := network.DefaultConfigWithAppConfig(testutil.AppConfig) | ||
require.NoError(t, err) | ||
cfg.NumValidators = 1 | ||
suite.Run(t, NewIntegrationTestSuite(cfg)) | ||
} |
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,46 @@ | ||
modules: | ||
- name: runtime | ||
config: | ||
"@type": cosmos.app.runtime.v1alpha1.Module | ||
|
||
app_name: NftApp | ||
|
||
begin_blockers: [staking, auth, bank, genutil, nft, params] | ||
end_blockers: [staking, auth, bank, genutil, nft, params] | ||
init_genesis: [auth, bank, staking, genutil, nft, params] | ||
|
||
- name: auth | ||
config: | ||
"@type": cosmos.auth.module.v1.Module | ||
bech32_prefix: cosmos | ||
module_account_permissions: | ||
- account: fee_collector | ||
- account: bonded_tokens_pool | ||
permissions: [burner, staking] | ||
- account: not_bonded_tokens_pool | ||
permissions: [burner, staking] | ||
- account: nft | ||
|
||
- name: bank | ||
config: | ||
"@type": cosmos.bank.module.v1.Module | ||
|
||
- name: params | ||
config: | ||
"@type": cosmos.params.module.v1.Module | ||
|
||
- name: tx | ||
config: | ||
"@type": cosmos.tx.module.v1.Module | ||
|
||
- name: nft | ||
config: | ||
"@type": cosmos.nft.module.v1.Module | ||
|
||
- name: staking | ||
config: | ||
"@type": cosmos.staking.module.v1.Module | ||
|
||
- name: genutil | ||
config: | ||
"@type": cosmos.genutil.module.v1.Module |
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,12 @@ | ||
package testutil | ||
|
||
import ( | ||
_ "embed" | ||
|
||
"cosmossdk.io/core/appconfig" | ||
) | ||
|
||
//go:embed app.yaml | ||
var appConfig []byte | ||
|
||
var AppConfig = appconfig.LoadYAML(appConfig) |