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

test(rust): assert only stdout in command bats tests #3449

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

mrinalwadhwa
Copy link
Member

@mrinalwadhwa mrinalwadhwa commented Sep 9, 2022

Before this PR we assert output that includes both stdout and stderr in bats tests.
This makes the test fail when there is informational messages on stderr like upgrade available.

This PR fixes that with --separate-stderr option

https://bats-core.readthedocs.io/en/stable/writing-tests.html#run-test-other-commands

It require bats version 1.5.0 or greater.
https://bats-core.readthedocs.io/en/stable/warnings/BW02.html#how-to-fix

@mrinalwadhwa mrinalwadhwa requested a review from a team as a code owner September 9, 2022 19:38
@mergify mergify bot merged commit 70c79a5 into develop Sep 9, 2022
@mrinalwadhwa mrinalwadhwa deleted the mrinal/fix_bats_test branch March 9, 2023 07:07
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.

1 participant