Skip to content

Commit

Permalink
test(dogfood): fix the dogfood tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMustermann2 committed Apr 5, 2024
1 parent 5a931b7 commit 1c0062a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions x/dogfood/types/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,23 @@ func (suite *GenesisTestSuite) TestValidateGenesis() {
malleate func(*types.GenesisState)
}{
{
name: "constructor",
genState: &types.GenesisState{},
expPass: false, // no validators
name: "constructor",
genState: &types.GenesisState{
Params: params,
},
expPass: true,
},
{
name: "default",
genState: types.DefaultGenesis(),
expPass: false, // no validators
expPass: true,
},
{
name: "NewGenesis call",
genState: types.NewGenesis(
params, []types.GenesisValidator{},
),
expPass: false, // no validators
expPass: true,
},
{
name: "too many validators",
Expand All @@ -54,7 +56,7 @@ func (suite *GenesisTestSuite) TestValidateGenesis() {
malleate: func(gs *types.GenesisState) {
// note the plus 1
for i := 0; i < int(gs.Params.MaxValidators)+1; i++ {
// generatea new key each time
// generate a new key each time
key := hexutil.Encode(
ed25519.GenPrivKey().PubKey().Bytes(),
)
Expand Down

0 comments on commit 1c0062a

Please sign in to comment.