Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: x/authz app wiring integration tests #12263

Closed
wants to merge 11 commits into from
9 changes: 5 additions & 4 deletions x/authz/client/testutil/cli_test.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
//go:build norace
// +build norace

package testutil

import (
_ "embed"
atheeshp marked this conversation as resolved.
Show resolved Hide resolved
"testing"

"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"

"github.com/cosmos/cosmos-sdk/testutil/network"
"github.com/cosmos/cosmos-sdk/x/authz/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))
}
45 changes: 45 additions & 0 deletions x/authz/testutil/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
modules:
- name: runtime
config:
"@type": cosmos.app.runtime.v1alpha1.Module
app_name: AuthzApp
begin_blockers: [staking, auth, bank,gov, genutil, authz, params]
end_blockers: [staking, auth, bank, gov, genutil, authz, params]
init_genesis: [auth, bank, staking, gov, genutil, authz, 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: gov
permissions: [burner]

- 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: staking
config:
"@type": cosmos.staking.module.v1.Module

- name: authz
config:
"@type": cosmos.authz.module.v1.Module

- name: genutil
config:
"@type": cosmos.genutil.module.v1.Module
21 changes: 21 additions & 0 deletions x/authz/testutil/app_config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package testutil

import (
_ "embed"

_ "github.com/cosmos/cosmos-sdk/x/auth"
_ "github.com/cosmos/cosmos-sdk/x/auth/tx/module"
_ "github.com/cosmos/cosmos-sdk/x/authz"
_ "github.com/cosmos/cosmos-sdk/x/bank"
_ "github.com/cosmos/cosmos-sdk/x/genutil"
_ "github.com/cosmos/cosmos-sdk/x/gov"
_ "github.com/cosmos/cosmos-sdk/x/params"
_ "github.com/cosmos/cosmos-sdk/x/staking"

"cosmossdk.io/core/appconfig"
)

//go:embed app.yaml
var appConfig []byte

var AppConfig = appconfig.LoadYAML(appConfig)