mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
checkmarxExecuteScan: Improve error message on compliance issues (#3083)
* Update checkmarxExecuteScan.go * Fix test
This commit is contained in:
parent
97a173952b
commit
2997714a02
@ -106,7 +106,7 @@ func runScan(config checkmarxExecuteScanOptions, sys checkmarx.System, influx *c
|
||||
|
||||
err = uploadAndScan(config, sys, project, influx, utils)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to run scan and upload result")
|
||||
return errors.Wrap(err, "scan, upload, and result validation returned an error")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -662,7 +662,7 @@ func TestVerifyOnly_errorOnWriteFileDoesNotBlock(t *testing.T) {
|
||||
utilsMock.errorOnWriteFile = true
|
||||
|
||||
err = runScan(options, sys, &influx, utilsMock)
|
||||
assert.EqualError(t, err, "failed to run scan and upload result: project TestExisting not compliant: failed to get detailed results: failed to write file: error on WriteFile")
|
||||
assert.EqualError(t, err, "scan, upload, and result validation returned an error: project TestExisting not compliant: failed to get detailed results: failed to write file: error on WriteFile")
|
||||
}
|
||||
|
||||
func TestRunScanWOtherCycle(t *testing.T) {
|
||||
@ -711,7 +711,7 @@ func TestRunScanErrorInZip(t *testing.T) {
|
||||
utilsMock.errorOnFileInfoHeader = true
|
||||
|
||||
err = runScan(options, sys, &influx, utilsMock)
|
||||
assert.EqualError(t, err, "failed to run scan and upload result: failed to zip workspace files: failed to compact folder: error on FileInfoHeader")
|
||||
assert.EqualError(t, err, "scan, upload, and result validation returned an error: failed to zip workspace files: failed to compact folder: error on FileInfoHeader")
|
||||
}
|
||||
|
||||
func TestRunScanForPullRequest(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user