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

feat: add AssertTgPlanAllExitCode #1323

Merged
merged 1 commit into from Jul 26, 2023

Conversation

bt-macole
Copy link
Contributor

@bt-macole bt-macole commented Jul 21, 2023

Description

this adds an assertion to use with TgPlanAllExitCode.

since run-all plan with -detailed-exitcode can return a 0 or 2 on successful plans, this assertions checks for either acceptable value and asserts if true or false depending on the assertion under test, designated by the assertTrue input arg.

this has been passed around as a helper function for simple regression testing using plan all across many modules, seemed like time to share it with the community.

resolves #1324

TODOs

Read the Gruntwork contribution guidelines.

  • Run the relevant tests successfully, including pre-commit checks.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Added / Removed / Updated [X].

Added AssertTgPlanAllExitCode to validate TgPlanAllE

this adds an assertion to use with TgPlanAllE.

since run-all plan with `-detailed-exitcode` can return a `0` or `2` on successful plans,
this assertions checks for either acceptable value and asserts if true or false
depending on the assertion under test, designated by the `assertTrue` input arg.

this has been passed around as a helper function for simple regression testing using plan all
across many modules, seemed like time to share it with the community.
@denis256 denis256 merged commit 2df0170 into gruntwork-io:master Jul 26, 2023
2 of 3 checks passed
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.

function to assert TgPlanAllExitCode
2 participants