diff --git a/cmd/fortifyExecuteScan.go b/cmd/fortifyExecuteScan.go index c6db0fb55..a49a046b8 100644 --- a/cmd/fortifyExecuteScan.go +++ b/cmd/fortifyExecuteScan.go @@ -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 { diff --git a/cmd/fortifyExecuteScan_test.go b/cmd/fortifyExecuteScan_test.go index 3a458e619..ce12a0335 100644 --- a/cmd/fortifyExecuteScan_test.go +++ b/cmd/fortifyExecuteScan_test.go @@ -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