From d92c9c1047bb83b88c201eb0d54bbaaa2f45ce58 Mon Sep 17 00:00:00 2001 From: Hadar Shpivak Date: Tue, 15 Oct 2024 15:46:40 +0300 Subject: [PATCH] fix audit tests for xray-url after merge 2 --- audit_test.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/audit_test.go b/audit_test.go index 89e323b0..2ba4f6fc 100644 --- a/audit_test.go +++ b/audit_test.go @@ -747,15 +747,25 @@ func TestXrayAuditNotEntitledForJasWithXrayUrl(t *testing.T) { defer cleanUp() output := testXrayAuditJas(t, cliToRun, filepath.Join("jas", "jas"), "3", false, false) // Verify that scan results are printed - securityTestUtils.VerifySimpleJsonScanResults(t, output, 0, 8, 0) + securityTestUtils.VerifySimpleJsonScanResults(t, output, validations.ValidationParams{Vulnerabilities: 8}) // Verify that JAS results are not printed - securityTestUtils.VerifySimpleJsonJasResults(t, output, 0, 0, 0, 0, 0, 0, 0, 0, 0) + securityTestUtils.VerifySimpleJsonJasResults(t, output, validations.ValidationParams{}) } func TestXrayAuditJasSimpleJsonWithXrayUrl(t *testing.T) { cliToRun, cleanUp := securityTestUtils.InitTestWithMockCommandOrParams(t, true, getNoJasAuditMockCommand) defer cleanUp() output := testXrayAuditJas(t, cliToRun, filepath.Join("jas", "jas"), "3", false, false) - securityTestUtils.VerifySimpleJsonScanResults(t, output, 0, 8, 0) - securityTestUtils.VerifySimpleJsonJasResults(t, output, 1, 9, 6, 3, 1, 1, 2, 0, 0) + securityTestUtils.VerifySimpleJsonScanResults(t, output, 0, validations.ValidationParams{Vulnerabilities: 8}) + securityTestUtils.VerifySimpleJsonJasResults(t, output, 1, validations.ValidationParams{ + Sast: 1, + Iac: 9, + Secrets: 6, + + Vulnerabilities: 8, + Applicable: 3, + Undetermined: 1, + NotCovered: 1, + NotApplicable: 2, + }) }