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

Cleanup 03-connection msg validate basic test #3244

Merged
merged 3 commits into from
Mar 8, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions modules/core/03-connection/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,22 +216,22 @@ func (suite *MsgTestSuite) TestNewMsgConnectionOpenConfirm() {
}

testCases := []struct {
name string
msg *types.MsgConnectionOpenConfirm
expPass bool
errMsg string
}{
{testMsgs[0], false, "invalid connection ID"},
{testMsgs[1], false, "empty proofTry"},
{testMsgs[2], false, "empty signer"},
{testMsgs[3], true, "success"},
{"invalid connection ID", testMsgs[0], false},
expertdicer marked this conversation as resolved.
Show resolved Hide resolved
{"empty proofTry", testMsgs[1], false},
{"empty signer", testMsgs[2], false},
{"success", testMsgs[3], true},
}

for i, tc := range testCases {
for _, tc := range testCases {
err := tc.msg.ValidateBasic()
if tc.expPass {
suite.Require().NoError(err, "Msg %d failed: %s", i, tc.errMsg)
suite.Require().NoError(err, tc.name)
} else {
suite.Require().Error(err, "Invalid Msg %d passed: %s", i, tc.errMsg)
suite.Require().Error(err, tc.name)
}
}
}