Skip to content

Commit

Permalink
added intergration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bermuell committed Sep 18, 2024
1 parent 56c91f3 commit f3ea69b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/integration/interchain_security_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"cosmossdk.io/math"

sdk "github.com/cosmos/cosmos-sdk/types"
crysistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

"github.com/cosmos/gaia/v20/ante"
Expand All @@ -38,6 +39,27 @@ func TestCCVTestSuite(t *testing.T) {
suite.Run(t, ccvSuite)
}

func TestVerifyInvariant(t *testing.T) {
ccvSuite.SetT(t)
ccvSuite.SetupTest()
delAddr := ccvSuite.GetProviderChain().SenderAccount.GetAddress()
msg := crysistypes.MsgVerifyInvariant{
Sender: delAddr.String(),
InvariantModuleName: "gov",
InvariantRoute: "module-account",
}

var err error
var resp *crysistypes.MsgVerifyInvariantResponse
provCtx := ccvSuite.GetProviderChain().GetContext()
require.NotPanics(t, func() {
resp, err = app.CrisisKeeper.VerifyInvariant(provCtx, &msg)

})
require.NoError(t, err, "verify invariant returned an error")
require.NotNil(t, resp, "verify invariant returned an invalid response")
}

func TestICSEpochs(t *testing.T) {
// a bit hacky but cannot be called
// in SetupTest() since it requires `t`
Expand Down

0 comments on commit f3ea69b

Please sign in to comment.