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:
parent
666923e651
commit
51158d2457
@ -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)
|
||||
|
@ -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")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user