-
Notifications
You must be signed in to change notification settings - Fork 509
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
Issue with skipped violations using CircleCI and JUnit output format #1122
Comments
gchappel
added a commit
to gchappel/terrascan
that referenced
this issue
Jan 21, 2022
This is a potential fix to prevent both `skipped` and `failure` elements on a skipped violation in JUnit output format Fixes: tenable#1122
gchappel
added a commit
to gchappel/terrascan
that referenced
this issue
Feb 5, 2022
This is a potential fix to prevent both `skipped` and `failure` elements on a skipped violation in JUnit output format Fixes: tenable#1122
gchappel
added a commit
to gchappel/terrascan
that referenced
this issue
Feb 8, 2022
This is a potential fix to prevent both `skipped` and `failure` elements on a skipped violation in JUnit output format Fixes: tenable#1122
patilpankaj212
pushed a commit
that referenced
this issue
Feb 8, 2022
* Prevent adding both skipped and failure elements This is a potential fix to prevent both `skipped` and `failure` elements on a skipped violation in JUnit output format Fixes: #1122 * rebase to fix tests, and remove violation details from skip message
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I/we are running Terrascan tests against some Terraform code, but trying to skip one known validation. This is executing through CircleCI, with the output in JUnit XML format and stored for display in the CircleCI webUI using
store_test_results
The issue is that skipped violations, when output in JUnit format contain both the
skipped
element AND still contain afailure
element. This appears to be causing CircleCI to show skipped violations as test failures, meaning that:terrascan
exits with0
) the Tests tab on the CircleCI build still shows errors where there should be none.terrascan
exits with>0
) the Tests tab shows all skipped violations as errors, making it difficult to pinpoint what actually needs fixing at first glance. For example if you have 9 known violations with skip tags, and 1 genuine violation, they are all displayed identically as failed tests in the CircleCI UI.I can't share the Terraform code itself but if required I'm happy to put together a minimal reproduction for this
I believe the issue is:
<xs:choice>
elementskipped
AND afailure
element, which appears to be against this spectestcase
s that have afailure
element, without taking theskipped
element into account as the use of these two elements together appears to be outside the schemaWhat I Did
The text was updated successfully, but these errors were encountered: