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

#1682: fix unit tests #1734

Merged
merged 25 commits into from
Feb 14, 2025
Merged

#1682: fix unit tests #1734

merged 25 commits into from
Feb 14, 2025

Conversation

Ifropc
Copy link
Contributor

@Ifropc Ifropc commented Nov 18, 2024

Part of #1682

Fixes unit tests, including restoring help tests

Why

Previously, we were using clap's get_matches_from that exits with code 0 (printing help message). This made our tests exit with code 0 as well (when calling --help).
As part of the change we handle DisplayError returning help message, and keeping existing behavior for all other clap errors.

Known limitations

Some win tests are failing

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb
@leighmcculloch
Copy link
Member

This tests are fixed in other PRs (see #1682 )

What needs to merge before this PR can be merged?

@Ifropc
Copy link
Contributor Author

Ifropc commented Nov 26, 2024

@leighmcculloch we can either merge all listed PRs at the same time or merge all of them here first

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb
@elizabethengelman
Copy link
Contributor

This is looking great! Thanks for digging into it - it was driving me crazy ;p

we can either merge all listed PRs at the same time or merge all of them here first

W/r/t when to merge this and the other PRs, i like the idea of merging those test fixing into this PR first.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Co-authored-by: Elizabeth Engelman <4752801+elizabethengelman@users.noreply.github.com>
Copy link
Member

@leighmcculloch leighmcculloch left a comment

Choose a reason for hiding this comment

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

Thanks for figuring out why these tests were preventing from running. Great find and learning for us all.

For the solution, I'd like us to reconsider the approach here, see the inline comment. Please lmk if there's a reason we can't do the error approach.

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb
Copy link
Member

@leighmcculloch leighmcculloch left a comment

Choose a reason for hiding this comment

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

One ask, otherwise this looks good, very easy to follow.

Ifropc and others added 3 commits December 20, 2024 11:19

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
* Fix init test

* Update sdk version

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
* fix config tests

* Fix version test

* fix: clippy

---------

Co-authored-by: Willem Wyndham <willem@ahalabs.dev>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
* Fix build tests

* revert implementation
@Ifropc Ifropc changed the title #1682: fix help tests #1682: fix unit tests Dec 20, 2024

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb
Copy link
Contributor

@elizabethengelman elizabethengelman left a comment

Choose a reason for hiding this comment

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

This is looking good to me, besides @leighmcculloch 's comment about moving the HelpMessage switching to the top level. I wonder this PR can go in as-is, and that can be a follow up PR?

I'm also curious what the exit code should be when no --help flag is passed. I am currently seeing that scenario, as well as when a --help is passing both returning a 0 error code.

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb
@Ifropc Ifropc force-pushed the 1682-help-tests branch 3 times, most recently from 7a0c827 to 80daeb7 Compare February 5, 2025 19:29

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb
@Ifropc Ifropc force-pushed the 1682-help-tests branch 2 times, most recently from 92a021a to da1dd35 Compare February 5, 2025 20:19

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb
@Ifropc Ifropc requested a review from a team as a code owner February 12, 2025 21:02
@Ifropc Ifropc requested review from leighmcculloch and removed request for a team February 12, 2025 23:15

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was signed with the committer’s verified signature.
Ifropc Gleb
@Ifropc Ifropc merged commit eb3efb5 into main Feb 14, 2025
31 checks passed
@Ifropc Ifropc deleted the 1682-help-tests branch February 14, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Fix soroban-test integration tests to make sure the full suite is being run in CI/CD
4 participants