Skip to content

test: add acceptance tests for IaCV2 [IAC-3297] - #5875

Merged
ioannacaba merged 1 commit into
mainfrom
feat/IAC-3297/add-acceptance-tests-for-iacv2
May 13, 2025
Merged

test: add acceptance tests for IaCV2 [IAC-3297]#5875
ioannacaba merged 1 commit into
mainfrom
feat/IAC-3297/add-acceptance-tests-for-iacv2

Conversation

@ioannacaba

@ioannacaba ioannacaba commented May 5, 2025

Copy link
Copy Markdown
Contributor

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Highlights breaking API changes (if applicable)
  • Links to automated tests covering new functionality
  • Includes manual testing instructions (if necessary)
  • Updates relevant GitBook documentation (PR link: ___)
  • Includes product update to be announced in the next stable release notes

What does this PR do?

Adds acceptance tests for IaCV2. We need acceptance test for IaCV2 to verify that a new change made in the CLI does not affect IaC scans for IaCV2.

The new acceptance tests cover a range of scenarios, including:

  • Verification of file output (file-output.spec.ts).
  • Directory scanning across multiple IaC types (test-directory.spec.ts).
  • Correct handling of the --org flag (org-flag.spec.ts).

And the folowing tests validating scans for multiple IaC types (like arm, cloudformation, terraform, terraform-plan, kubernetes):

  • multidoc-yaml.spec.ts
  • test-arm.spec.ts
  • test-cloudformation.spec.ts
  • test-kubernetes.spec.ts
  • test-terraform-plan.spec.ts

These tests validate behavior with different output formats (--json, --sarif), severity threshold filtering (--severity-threshold), scan depth control (--detection-depth), and multi-path scanning. All the tests enable the iacNewEngine FF before execution.

Where should the reviewer start?

All the tests were added in the test/jest/acceptance/iac directory.

How should this be manually tested?

Just by running in the CLI the command: npm run test:acceptance.

What's the product update that needs to be communicated to CLI users?

No product update.

@ioannacaba ioannacaba self-assigned this May 5, 2025
@ioannacaba
ioannacaba force-pushed the feat/IAC-3297/add-acceptance-tests-for-iacv2 branch from aacb067 to c9ccca6 Compare May 5, 2025 10:29
@CatalinSnyk

Copy link
Copy Markdown
Contributor

@ioannacaba Just putting this out there, but I think you can get the secret secret scan to pass by squashing the commits into one. Let me know if you need help 😄

@ioannacaba
ioannacaba force-pushed the feat/IAC-3297/add-acceptance-tests-for-iacv2 branch 7 times, most recently from 71d4196 to f9b6104 Compare May 8, 2025 06:55
@ioannacaba ioannacaba closed this May 8, 2025
@ioannacaba ioannacaba reopened this May 8, 2025
@ioannacaba
ioannacaba marked this pull request as ready for review May 8, 2025 07:30
@ioannacaba
ioannacaba requested a review from a team as a code owner May 8, 2025 07:30
@ioannacaba
ioannacaba force-pushed the feat/IAC-3297/add-acceptance-tests-for-iacv2 branch 2 times, most recently from f9e8d68 to de3c633 Compare May 8, 2025 08:26
@j-luong j-luong changed the title fix: add acceptance tests for IaCV2 [IAC-3297] test: add acceptance tests for IaCV2 [IAC-3297] May 8, 2025
@j-luong j-luong changed the title test: add acceptance tests for IaCV2 [IAC-3297] test(iac): add acceptance tests for IaCV2 [IAC-3297] May 8, 2025
@j-luong j-luong changed the title test(iac): add acceptance tests for IaCV2 [IAC-3297] test: add acceptance tests for IaCV2 [IAC-3297] May 8, 2025

@j-luong j-luong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

update the commit message from fix: add acceptance tests for IaCV2 [IAC-3297]
to test: add acceptance tests for IaCV2 [IAC-3297] or chore: add acceptance tests for IaCV2 [IAC-3297]

to avoid any versioning issues

@ioannacaba
ioannacaba force-pushed the feat/IAC-3297/add-acceptance-tests-for-iacv2 branch 2 times, most recently from 04a7e21 to 059178f Compare May 8, 2025 13:51
@ioannacaba
ioannacaba requested a review from j-luong May 9, 2025 07:39
@ioannacaba
ioannacaba force-pushed the feat/IAC-3297/add-acceptance-tests-for-iacv2 branch from 059178f to 1e7a9c0 Compare May 13, 2025 07:59
@ioannacaba
ioannacaba merged commit 8516078 into main May 13, 2025
@ioannacaba
ioannacaba deleted the feat/IAC-3297/add-acceptance-tests-for-iacv2 branch May 13, 2025 08:49
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