* clear

* feat: Add everything

* fix: Commenht
This commit is contained in:
Prad Nukala
2025-10-03 14:45:52 -04:00
committed by GitHub
parent 43b4a11c06
commit 13e6c3e84d
1935 changed files with 655061 additions and 40058 deletions
Regular → Executable
+29 -2
View File
@@ -5,12 +5,14 @@ import (
abci "github.com/cometbft/cometbft/abci/types"
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/gogoproto/proto"
"github.com/stretchr/testify/require"
"cosmossdk.io/log"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/msgservice"
)
func TestAppExport(t *testing.T) {
@@ -34,6 +36,7 @@ func TestAppExport(t *testing.T) {
// Making a new app object with the db, so that initchain hasn't been called
newGapp := NewChainApp(
logger, db, nil, true, simtestutil.NewAppOptionsWithFlagHome(t.TempDir()),
EVMAppOptions,
)
_, err = newGapp.ExportAppStateAndValidators(false, []string{}, nil)
require.NoError(t, err, "ExportAppStateAndValidators should not have an error")
@@ -51,12 +54,36 @@ func TestBlockedAddrs(t *testing.T) {
} else {
addr = gapp.AccountKeeper.GetModuleAddress(acc)
}
require.True(t, gapp.BankKeeper.BlockedAddr(addr), "ensure that blocked addresses are properly set in bank keeper")
require.True(
t,
gapp.BankKeeper.BlockedAddr(addr),
"ensure that blocked addresses are properly set in bank keeper",
)
})
}
}
func TestGetMaccPerms(t *testing.T) {
dup := GetMaccPerms()
require.Equal(t, maccPerms, dup, "duplicated module account permissions differed from actual module account permissions")
require.Equal(
t,
maccPerms,
dup,
"duplicated module account permissions differed from actual module account permissions",
)
}
// TestMergedRegistry tests that fetching the gogo/protov2 merged registry
// doesn't fail after loading all file descriptors.
func TestMergedRegistry(t *testing.T) {
r, err := proto.MergedRegistry()
require.NoError(t, err)
require.Greater(t, r.NumFiles(), 0)
}
func TestProtoAnnotations(t *testing.T) {
r, err := proto.MergedRegistry()
require.NoError(t, err)
err = msgservice.ValidateProtoAnnotations(r)
require.NoError(t, err)
}