1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

Update fortifyExecuteScan.go (#2093)

* Update fortifyExecuteScan.go

* Update fortifyExecuteScan.go

* Docs are lying

Checked the API which returns a status similar to that of artifact

* Update fortifyExecuteScan_test.go
This commit is contained in:
Sven Merk 2020-09-29 18:26:16 +02:00 committed by GitHub
parent b47e08781c
commit 58b6c04cd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -386,7 +386,7 @@ func generateAndDownloadQGateReport(config fortifyExecuteScanOptions, sys fortif
}
log.Entry().Debugf("Triggered report generation of report ID %v", report.ID)
status := report.Status
for status != "Complete" && status != "Error Processing" {
for status == "PROCESSING" || status == "SCHED_PROCESSING" {
time.Sleep(10 * time.Second)
report, err = sys.GetReportDetails(report.ID)
if err != nil {

View File

@ -232,13 +232,13 @@ func (f *fortifyMock) GetIssueStatisticsOfProjectVersion(id int64) ([]*models.Is
func (f *fortifyMock) GenerateQGateReport(projectID, projectVersionID, reportTemplateID int64, projectName, projectVersionName, reportFormat string) (*models.SavedReport, error) {
if !f.Successive {
f.Successive = true
return &models.SavedReport{Status: "Processing"}, nil
return &models.SavedReport{Status: "PROCESSING"}, nil
}
f.Successive = false
return &models.SavedReport{Status: "Complete"}, nil
return &models.SavedReport{Status: "PROCESS_COMPLETE"}, nil
}
func (f *fortifyMock) GetReportDetails(id int64) (*models.SavedReport, error) {
return &models.SavedReport{Status: "Complete"}, nil
return &models.SavedReport{Status: "PROCESS_COMPLETE"}, nil
}
func (f *fortifyMock) UploadResultFile(endpoint, file string, projectVersionID int64) error {
return nil