Skip to content

Commit

Permalink
change test limits
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Rodriguez committed May 6, 2024
1 parent f501d92 commit 91c6260
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ func TestValidateParams(t *testing.T) {
require.Error(t, types.NewParams(true, []string{""}).Validate())
require.Error(t, types.NewParams(true, []string{" "}).Validate())
require.Error(t, types.NewParams(true, []string{"*", "/cosmos.bank.v1beta1.MsgSend"}).Validate())
require.Error(t, types.NewParams(true, make([]string, 1000)).Validate())
require.Error(t, types.NewParams(true, make([]string, types.MaxAllowListLength+1)).Validate())
}
2 changes: 1 addition & 1 deletion modules/core/02-client/types/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestValidateParams(t *testing.T) {
{"blank client", NewParams(" "), false},
{"duplicate clients", NewParams(exported.Tendermint, exported.Tendermint), false},
{"allow all clients plus valid client", NewParams(AllowAllClients, exported.Tendermint), false},
{"too many allowed clients", NewParams(make([]string, 500)...), false},
{"too many allowed clients", NewParams(make([]string, MaxAllowedClientsLength+1)...), false},
}

for _, tc := range testCases {
Expand Down
4 changes: 2 additions & 2 deletions modules/core/03-connection/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenTry() {
{"invalid consensusHeight", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clienttypes.ZeroHeight(), signer), false},
{"empty singer", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, ""), false},
{"invalid version", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{{}}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false},
{"too many counterparty versions", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, make([]*types.Version, 200), 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false},
{"too many features in counterparty version", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{{"v1", make([]string, 200)}}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false},
{"too many counterparty versions", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, make([]*types.Version, types.MaxCounterpartyVersionsLength+1), 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false},
{"too many features in counterparty version", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{{"v1", make([]string, types.MaxFeaturesLength+1)}}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), false},
{"success", types.NewMsgConnectionOpenTry("clienttotesta", "connectiontotest", "clienttotest", clientState, prefix, []*types.Version{ibctesting.ConnectionVersion}, 500, suite.proof, suite.proof, suite.proof, clientHeight, clientHeight, signer), true},
}

Expand Down

0 comments on commit 91c6260

Please sign in to comment.