Skip to content

Conversation

@cx-tamar-levi
Copy link
Collaborator

fix the test to find a scan with results and don't fail if there is a scan without results

@github-actions github-actions bot added the bug Something isn't working label May 16, 2024
@cx-pedro-lopes cx-pedro-lopes requested review from a team, cx-hugo-machado and cx-pedro-lopes and removed request for a team May 16, 2024 05:35
@cx-tamar-levi cx-tamar-levi enabled auto-merge (squash) May 16, 2024 05:35
@github-actions
Copy link
Contributor

github-actions bot commented May 16, 2024

Logo
Checkmarx One – Scan Summary & Detailsc708fb80-90c8-4d44-a578-e005dfe2f360

Policy Management Violations

Policy Name Rule(s) Break Build
[SAST-ML0] Not allowed NEW Sast vulnerabilities true

No New Or Fixed Issues Found

for (Scan scan : scanList) {
Results results = wrapper.results(UUID.fromString(scan.getId()));
if (results != null && results.getResults() != null) {
Assertions.assertEquals(results.getTotalCount(), results.getResults().size());
Copy link
Contributor

Choose a reason for hiding this comment

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

Dont we want to break the loop but assert not as part of the loop? this way we will not pass the assertion.

Copy link
Contributor

Choose a reason for hiding this comment

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

casue as it now, it'll assert only if we are in the if. and we want to make sure that the scanned did have results

@cx-tamar-levi cx-tamar-levi merged commit 5dccb3d into main May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants