Skip to content

Commit

Permalink
fix audit tests for xray-url after merge 2
Browse files Browse the repository at this point in the history
  • Loading branch information
hadarshjfrog committed Oct 15, 2024
1 parent a4b749a commit d92c9c1
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions audit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Check failure on line 750 in audit_test.go

View workflow job for this annotation

GitHub Actions / Go-Sec

undefined: securityTestUtils.VerifySimpleJsonScanResults

Check failure on line 750 in audit_test.go

View workflow job for this annotation

GitHub Actions / test (ubuntu)

undefined: securityTestUtils.VerifySimpleJsonScanResults

Check failure on line 750 in audit_test.go

View workflow job for this annotation

GitHub Actions / Static-Check

undefined: securityTestUtils.VerifySimpleJsonScanResults

Check failure on line 750 in audit_test.go

View workflow job for this annotation

GitHub Actions / test (windows)

undefined: securityTestUtils.VerifySimpleJsonScanResults

Check failure on line 750 in audit_test.go

View workflow job for this annotation

GitHub Actions / test (macos)

undefined: securityTestUtils.VerifySimpleJsonScanResults
// 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{})

Check failure on line 752 in audit_test.go

View workflow job for this annotation

GitHub Actions / Go-Sec

undefined: securityTestUtils.VerifySimpleJsonJasResults

Check failure on line 752 in audit_test.go

View workflow job for this annotation

GitHub Actions / test (ubuntu)

undefined: securityTestUtils.VerifySimpleJsonJasResults

Check failure on line 752 in audit_test.go

View workflow job for this annotation

GitHub Actions / Static-Check

undefined: securityTestUtils.VerifySimpleJsonJasResults

Check failure on line 752 in audit_test.go

View workflow job for this annotation

GitHub Actions / test (windows)

undefined: securityTestUtils.VerifySimpleJsonJasResults

Check failure on line 752 in audit_test.go

View workflow job for this annotation

GitHub Actions / test (macos)

undefined: securityTestUtils.VerifySimpleJsonJasResults
}

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})

Check failure on line 759 in audit_test.go

View workflow job for this annotation

GitHub Actions / Go-Sec

undefined: securityTestUtils.VerifySimpleJsonScanResults

Check failure on line 759 in audit_test.go

View workflow job for this annotation

GitHub Actions / test (ubuntu)

undefined: securityTestUtils.VerifySimpleJsonScanResults

Check failure on line 759 in audit_test.go

View workflow job for this annotation

GitHub Actions / Static-Check

undefined: securityTestUtils.VerifySimpleJsonScanResults

Check failure on line 759 in audit_test.go

View workflow job for this annotation

GitHub Actions / test (windows)

undefined: securityTestUtils.VerifySimpleJsonScanResults

Check failure on line 759 in audit_test.go

View workflow job for this annotation

GitHub Actions / test (macos)

undefined: securityTestUtils.VerifySimpleJsonScanResults
securityTestUtils.VerifySimpleJsonJasResults(t, output, 1, validations.ValidationParams{

Check failure on line 760 in audit_test.go

View workflow job for this annotation

GitHub Actions / Go-Sec

undefined: securityTestUtils.VerifySimpleJsonJasResults

Check failure on line 760 in audit_test.go

View workflow job for this annotation

GitHub Actions / test (ubuntu)

undefined: securityTestUtils.VerifySimpleJsonJasResults

Check failure on line 760 in audit_test.go

View workflow job for this annotation

GitHub Actions / Static-Check

undefined: securityTestUtils.VerifySimpleJsonJasResults (typecheck)

Check failure on line 760 in audit_test.go

View workflow job for this annotation

GitHub Actions / test (windows)

undefined: securityTestUtils.VerifySimpleJsonJasResults

Check failure on line 760 in audit_test.go

View workflow job for this annotation

GitHub Actions / test (macos)

undefined: securityTestUtils.VerifySimpleJsonJasResults
Sast: 1,
Iac: 9,
Secrets: 6,

Vulnerabilities: 8,
Applicable: 3,
Undetermined: 1,
NotCovered: 1,
NotApplicable: 2,
})
}

0 comments on commit d92c9c1

Please sign in to comment.