From ec9c3d47863e6cdf6bf02c83e68d44126d5132f6 Mon Sep 17 00:00:00 2001 From: pankhurisaxena28 <76627925+pankhurisaxena28@users.noreply.github.com> Date: Thu, 27 Jun 2024 21:03:40 +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 1ce8921..745eeb6 100644 --- a/tests/iac_scan_report_processor.test.ts +++ b/tests/iac_scan_report_processor.test.ts @@ -159,18 +159,18 @@ test( ); await suite.test( - 'zero violations, generates report only the note field', + 'zero violations, generates report with 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); },