From 902d2f9523785dde1134e00ec69dbda3f7ec36e0 Mon Sep 17 00:00:00 2001 From: pankhurisaxena28 <76627925+pankhurisaxena28@users.noreply.github.com> Date: Thu, 27 Jun 2024 21:01:34 +0530 Subject: [PATCH] Update iac_scan_report_processor.test.ts Signed-off-by: pankhurisaxena28 <76627925+pankhurisaxena28@users.noreply.github.com> --- tests/iac_scan_report_processor.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/iac_scan_report_processor.test.ts b/tests/iac_scan_report_processor.test.ts index 9ba5e9e..1ce8921 100644 --- a/tests/iac_scan_report_processor.test.ts +++ b/tests/iac_scan_report_processor.test.ts @@ -157,20 +157,20 @@ test( assert.deepStrictEqual(sarifJson.runs.at(0)?.results.length, 2); }, ); - + await suite.test( 'zero violations, generates report only the note field', async () => { const reportGenerator = new SarifReportGenerator('version'); - + const report: IACValidationReport = { note: 'IaC validation is limited to certain asset types and policies. For information about supported asset types and policies for IaC validation, see https://cloud.google.com/security-command-center/docs/supported-iac-assets-policies.', }; - + await IACScanReportProcessor.processReport(report, reportGenerator, 'sarif.json'); const sarif = await fs.readFile('./sarif.json', 'utf-8'); const sarifJson: SARIFTemplate = JSON.parse(sarif); - + assert.deepStrictEqual(sarifJson.runs.at(0)?.tool.driver.rules.length, 0); assert.deepStrictEqual(sarifJson.runs.at(0)?.results.length, 0); },