Skip to content

Commit

Permalink
fixing integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
orto17 committed Sep 22, 2024
1 parent 5b8e51a commit 381feeb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions audit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ func testAuditNpm(t *testing.T, format string, withVuln bool) string {
}

func TestXrayAuditConanJson(t *testing.T) {
output := testAuditConan(t, string(format.Json), false)
securityTestUtils.VerifyJsonScanResults(t, output, 8, 0, 3)
output := testAuditConan(t, string(format.Json), true)
securityTestUtils.VerifyJsonScanResults(t, output, 0, 8, 2)
}

func TestXrayAuditConanSimpleJson(t *testing.T) {
output := testAuditConan(t, string(format.SimpleJson), true)
securityTestUtils.VerifySimpleJsonScanResults(t, output, 8, 0, 3)
securityTestUtils.VerifySimpleJsonScanResults(t, output, 0, 8, 2)
}

func testAuditConan(t *testing.T, format string, withVuln bool) string {
Expand All @@ -85,7 +85,7 @@ func testAuditConan(t *testing.T, format string, withVuln bool) string {
prevWd := securityTestUtils.ChangeWD(t, tempDirPath)
defer clientTests.ChangeDirAndAssert(t, prevWd)
// Run conan install before executing jfrog audit
assert.NoError(t, exec.Command("conan", "install").Run())
assert.NoError(t, exec.Command("conan").Run())
watchName, deleteWatch := securityTestUtils.CreateTestWatch(t, "audit-policy", "audit-watch", xrayUtils.High)
defer deleteWatch()
args := []string{"audit", "--licenses", "--format=" + format, "--watches=" + watchName, "--fail=false"}
Expand Down

0 comments on commit 381feeb

Please sign in to comment.