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

chore: use expected errors in ica host test. #7181

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

bznein
Copy link
Contributor

@bznein bznein commented Aug 16, 2024

Description

closes: #7180


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

@bznein bznein marked this pull request as ready for review August 16, 2024 09:46
Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@@ -171,7 +171,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenTry() {
) (string, error) {
return "", fmt.Errorf("mock ica auth fails")
}
}, true,
}, nil,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could move this test up together the success ones.

@@ -291,7 +291,7 @@ func (suite *InterchainAccountsTestSuite) TestOnChanOpenConfirm() {
) error {
return fmt.Errorf("mock ica auth fails")
}
}, true,
}, nil,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

},
{
"invalid metadata bytestring",
func() {
// the try step will propose a new valid version
path.EndpointA.ChannelConfig.Version = "invalid-metadata-bytestring"
},
true,
nil,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also relocate this one up.

@@ -136,7 +136,7 @@ func (suite *KeeperTestSuite) TestNewKeeper() {
testCases := []struct {
name string
instantiateFn func()
expPass bool
exxPanicMsg string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
exxPanicMsg string
expPanicMsg string

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also just use panicMsg, since you use errMsg in other tests, but it's just a nit :)

Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for fixing these up!

Copy link

sonarcloud bot commented Aug 19, 2024

@bznein bznein added this pull request to the merge queue Aug 19, 2024
Merged via the queue into main with commit f698099 Aug 19, 2024
68 of 70 checks passed
@bznein bznein deleted the bznein/7180/icaHostTestsError branch August 19, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use expected errors instead of boolean values for ica host tests
3 participants