1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00

checkmarxExecuteScan: Fix access to projects (#1997)

This commit is contained in:
Sven Merk 2020-09-10 11:14:58 +02:00 committed by GitHub
parent 666923e651
commit 51158d2457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -133,7 +133,7 @@ func uploadAndScan(config checkmarxExecuteScanOptions, sys checkmarx.System, pro
}
func triggerScan(config checkmarxExecuteScanOptions, sys checkmarx.System, project checkmarx.Project, workspace string, incremental bool, influx *checkmarxExecuteScanInflux) {
projectIsScanning, scan := sys.ScanProject(project.ID, incremental, false, !config.AvoidDuplicateProjectScans)
projectIsScanning, scan := sys.ScanProject(project.ID, incremental, true, !config.AvoidDuplicateProjectScans)
if projectIsScanning {
log.Entry().Debugf("Scanning project %v ", project.Name)
pollScanStatus(sys, scan)

View File

@ -303,7 +303,7 @@ func TestRunScan(t *testing.T) {
runScan(options, sys, workspace, &influx)
assert.Equal(t, false, sys.isIncremental, "isIncremental has wrong value")
assert.Equal(t, false, sys.isPublic, "isPublic has wrong value")
assert.Equal(t, true, sys.isPublic, "isPublic has wrong value")
assert.Equal(t, true, sys.forceScan, "forceScan has wrong value")
}
@ -321,7 +321,7 @@ func TestRunScanWOtherCycle(t *testing.T) {
runScan(options, sys, workspace, &influx)
assert.Equal(t, true, sys.isIncremental, "isIncremental has wrong value")
assert.Equal(t, false, sys.isPublic, "isPublic has wrong value")
assert.Equal(t, true, sys.isPublic, "isPublic has wrong value")
assert.Equal(t, true, sys.forceScan, "forceScan has wrong value")
}
@ -339,7 +339,7 @@ func TestRunScanForPullRequest(t *testing.T) {
runScan(options, sys, workspace, &influx)
assert.Equal(t, true, sys.isIncremental, "isIncremental has wrong value")
assert.Equal(t, false, sys.isPublic, "isPublic has wrong value")
assert.Equal(t, true, sys.isPublic, "isPublic has wrong value")
assert.Equal(t, true, sys.forceScan, "forceScan has wrong value")
}
@ -357,7 +357,7 @@ func TestRunScanForPullRequestProjectNew(t *testing.T) {
runScan(options, sys, workspace, &influx)
assert.Equal(t, true, sys.isIncremental, "isIncremental has wrong value")
assert.Equal(t, false, sys.isPublic, "isPublic has wrong value")
assert.Equal(t, true, sys.isPublic, "isPublic has wrong value")
assert.Equal(t, true, sys.forceScan, "forceScan has wrong value")
}