Skip to content

Commit

Permalink
fix unit and integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pankhurisaxena28 committed Jun 27, 2024
1 parent 6417bcb commit 458d546
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ jobs:
fail_silently: 'false'
scan_timeout: '1m'
- name: 'Check scan result and compare sarif report generated.'
run: |
run:
report_expected="tests/resources/sarif.json"
report_generated="${{ steps.no-violations-found.outputs.iac_scan_result_sarif_path }}"
report_generated="${{ steps.violations-found.outputs.iac_scan_result_sarif_path }}"
if cmp -s "$report_expected" "$report_generated"; then
exit 1
fi
Expand All @@ -117,10 +117,10 @@ jobs:
scan_file_ref: 'tests/resources/no-violations-tf_plan.json'
iac_type: 'terraform'
failure_criteria: 'CRITICAL:2, Operator:OR'
- name: 'Check scan result and report not generated.'
- name: 'Check scan result and report generated.'
run:
report_expected="tests/resources/zero_violations_sarif.json"
report_generated="${{ steps.violations-found.outputs.iac_scan_result_sarif_path }}"
report_generated="${{ steps.no-violations-found.outputs.iac_scan_result_sarif_path }}"
if cmp -s "$report_expected" "$report_generated"; then
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion tests/iac_scan_report_processor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ test(
},
);

await suite.test('zero violations, generates report only the note', async () => {
await suite.test('zero violations, generates report with only the note', async () => {
const reportGenerator = new SarifReportGenerator('version');

const report: IACValidationReport = {
Expand Down

0 comments on commit 458d546

Please sign in to comment.