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: log errors in acceptance tests #5180

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Conversation

cmars
Copy link
Contributor

@cmars cmars commented Apr 18, 2024

What does this PR do?

When a Snyk CLI command is expected to exit 0 in acceptance tests, it would be useful for debugging to see the stderr from the process.

This adds an option to runSnykCLI (logErrors) to do this, opt-in. That way we don't pollute the log with expected non-zero exits in tests that expect them.

Pull Request Submission

Please check the boxes once done.

The pull request must:

  • Reviewer Documentation
    • follow CONTRIBUTING rules
    • be accompanied by a detailed description of the changes
    • contain a risk assessment of the change (Low | Medium | High) with regards to breaking existing functionality. A change e.g. of an underlying language plugin can completely break the functionality for that language, but appearing as only a version change in the dependencies.
    • highlight breaking API if applicable
    • contain a link to the automatic tests that cover the updated functionality.
    • contain testing instructions in case that the reviewer wants to manual verify as well, to add to the manual testing done by the author.
    • link to the link to the PR for the User-facing documentation
  • User facing Documentation
    • update any relevant documentation in gitbook by submitting a gitbook PR, and including the PR link here
    • ensure that the message of the final single commit is descriptive and prefixed with either feat: or fix: , others might be used in rare occasions as well, if there is no need to document the changes in the release notes. The changes or fixes should be described in detail in the commit message for the changelog & release notes.
  • Testing
    • Changes, removals and additions to functionality must be covered by acceptance / integration tests or smoke tests - either already existing ones, or new ones, created by the author of the PR.

@cmars cmars force-pushed the chore/log-acceptance-test-errors branch from 25fcba4 to ecb0879 Compare April 19, 2024 18:56
@cmars cmars marked this pull request as ready for review April 19, 2024 19:04
@cmars cmars requested a review from a team as a code owner April 19, 2024 19:04
@cmars cmars force-pushed the chore/log-acceptance-test-errors branch from ecb0879 to 96781ce Compare April 19, 2024 19:39
When a Snyk CLI command is expected to exit 0 in acceptance tests, it
would be useful for debugging to see the stderr from the process.

This adds an option to runSnykCLI (logErrors) to do this, opt-in. That
way we don't pollute the log with expected non-zero exits in tests that
expect them.
@cmars cmars force-pushed the chore/log-acceptance-test-errors branch from 96781ce to ecdd86c Compare April 22, 2024 13:35
@cmars cmars merged commit d564470 into main Apr 22, 2024
15 checks passed
@cmars cmars deleted the chore/log-acceptance-test-errors branch April 22, 2024 15:45
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.

3 participants