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 match using regular expressions #40

Merged
merged 1 commit into from
May 30, 2024

Conversation

ilmanzo
Copy link
Contributor

@ilmanzo ilmanzo commented May 26, 2024

Description of the changes
Changed integration tests to match output with a regular expression, to keep in consideration that compiled executable can be run from a temp location ( /tmp/$RANDOM_DIR )

Related issue(s)
Fixes #39

Type of change
Please select one or multiple of the following options:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code cleanup (refactoring or improving code quality)
  • Documentation update (adding or updating documentation, updating README)

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Additional information
Add any other information or screenshots about the pull request here.

@jkfran
Copy link
Owner

jkfran commented May 29, 2024

Thank you so much for reporting and working on a solution.

Can you please fix the conflicts? 🙏🏼

@ilmanzo ilmanzo force-pushed the fix-integration-test-for-OBS-build branch from 6151c6f to 93ad530 Compare May 30, 2024 05:59
@ilmanzo ilmanzo force-pushed the fix-integration-test-for-OBS-build branch from 93ad530 to b2574f2 Compare May 30, 2024 08:09
@ilmanzo
Copy link
Contributor Author

ilmanzo commented May 30, 2024

Thank you so much for reporting and working on a solution.

Can you please fix the conflicts? 🙏🏼

done, please note that running the test in parallel may conflict, because they spawn a service on the same port. Either use different port for each test, or run the tests with
cargo test -- --test-threads=1 to make them sequential.

@ilmanzo
Copy link
Contributor Author

ilmanzo commented May 30, 2024

this also fixes cargo clippy complaints, so we can close #41 as well

Copy link
Owner

@jkfran jkfran left a comment

Choose a reason for hiding this comment

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

Thank you!

@jkfran jkfran merged commit 55d9978 into jkfran:main May 30, 2024
12 checks passed
@ilmanzo ilmanzo deleted the fix-integration-test-for-OBS-build branch May 30, 2024 09:57
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.

Integration test fails during package build due to stdout mismatch on compiled binary path
2 participants