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

Use & Test Specific Exit Codes in Smoke Tests #375

Open
tdurk93 opened this issue Jan 18, 2024 · 0 comments
Open

Use & Test Specific Exit Codes in Smoke Tests #375

tdurk93 opened this issue Jan 18, 2024 · 0 comments
Assignees
Labels
github_actions Pull requests that update GitHub Actions code story New feature or request testing Bulk of this work is writing or updating unit/smoke tests

Comments

@tdurk93
Copy link
Contributor

tdurk93 commented Jan 18, 2024

  1. We should start using unique exit codes to differentiate between reasons for exiting (e.g. failing a scan versus versus failing due to an exception).
  2. Scan failures are the most important case to recognize and are already implemented (they now return a 3) but there may be others cases we wish to distinguish/test
  3. We aren't currently testing for specific exit codes in any of our pipeline's post-release smoke tests, only checking for a nonzero response. We should be checking for specific exit codes.
  4. We should be utilizing the ExitCode enum added in the models/ directory.
  5. We should also be testing for a "happy-path" scan that returns a 0 response code (note: will either require staging some files and scanning the newly-staged diffs, or adding the ability to scan a specific subdirectory prior to completing this work)
@dlolaogundipe dlolaogundipe added story New feature or request github_actions Pull requests that update GitHub Actions code labels Jan 24, 2024
@blonienc blonienc added the testing Bulk of this work is writing or updating unit/smoke tests label Mar 22, 2024
@LaKeishaTurnerSlalom LaKeishaTurnerSlalom self-assigned this Apr 19, 2024
ian-bowden-slalom pushed a commit that referenced this issue Jun 27, 2024
secureli-375
#375

<!-- Include general description here -->
Added Additional Exit Codes based on error types as discussed. Passing
exitCode to the ScanFailure class

## Changes
<!-- A detailed list of changes -->
* Added Exit Codes
* Updated ScanFailure
* Updated Unit Tests
* Verified no additional errors

## Testing
<!--
Mention updated tests and any manual testing performed.
Are aspects not yet tested or not easily testable?
Feel free to include screenshots if appropriate.
 -->
*

## Clean Code Checklist
<!-- This is here to support you. Some/most checkboxes may not apply to
your change -->
- [x] Meets acceptance criteria for issue
- [x] New logic is covered with automated tests
- [ ] Appropriate exception handling added
- [ ] Thoughtful logging included
- [ ] Documentation is updated
- [ ] Follow-up work is documented in TODOs
- [ ] TODOs have a ticket associated with them
- [x] No commented-out code included


<!--
Github-flavored markdown reference:
https://docs.github.com/en/get-started/writing-on-github
-->

---------

Co-authored-by: Ian Bowden <ian.bowden@slalom>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code story New feature or request testing Bulk of this work is writing or updating unit/smoke tests
Projects
Status: Done
Development

No branches or pull requests

6 participants