diff --git a/operator/controllers/execution/scans/scan_reconciler.go b/operator/controllers/execution/scans/scan_reconciler.go index c30151c0..e8c7a65f 100644 --- a/operator/controllers/execution/scans/scan_reconciler.go +++ b/operator/controllers/execution/scans/scan_reconciler.go @@ -50,7 +50,7 @@ func (r *ScanReconciler) startScan(scan *executionv1.Scan) error { log.V(7).Info("Unable to fetch ScanType") scan.Status.State = "Errored" - scan.Status.ErrorDescription = fmt.Sprintf("Configured ScanType '%s' not found in Scans Namespace. You'll likely need to deploy the ScanType.", scan.Spec.ScanType) + scan.Status.ErrorDescription = fmt.Sprintf("Configured ScanType '%s' not found in '%s' namespace. You'll likely need to deploy the ScanType.", scan.Spec.ScanType, scan.Namespace) if err := r.Status().Update(ctx, scan); err != nil { r.Log.Error(err, "unable to update Scan status") return err diff --git a/tests/integration/generic/no-scan-definition-error.test.js b/tests/integration/generic/no-scan-definition-error.test.js index 1bde65e6..8ff8e3d3 100644 --- a/tests/integration/generic/no-scan-definition-error.test.js +++ b/tests/integration/generic/no-scan-definition-error.test.js @@ -1,14 +1,13 @@ -const { scan } = require('../helpers') +const { scan } = require("../helpers"); test( - "scan without a matching ScanType should be marked as errored", - async () => { - await expect(scan( - "scan-type-not-found", - "this-type-does-not-exists", - [], - 30 - )).rejects.toThrow(`Scan failed with description "Configured ScanType 'this-type-does-not-exists' not found in Scans Namespace. You'll likely need to deploy the ScanType."`); - }, - 1 * 60 * 1000 - ); \ No newline at end of file + "scan without a matching ScanType should be marked as errored", + async () => { + await expect( + scan("scan-type-not-found", "this-type-does-not-exists", [], 30) + ).rejects.toThrow( + `Scan failed with description "Configured ScanType 'this-type-does-not-exists' not found in 'integration-tests' namespace. You'll likely need to deploy the ScanType."` + ); + }, + 1 * 60 * 1000 +);