Skip to content

Commit

Permalink
fix tests due to an added passed provider check
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Amelchenko committed Aug 28, 2024
1 parent 233e15b commit 558e405
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_apprunner_resources(mocker: MockerFixture, graph_framework):
sca_image_report = next(report for report in reports if report.check_type == CheckType.SCA_IMAGE)

assert len(tf_report.resources) == 1
assert len(tf_report.passed_checks) == 0
assert len(tf_report.passed_checks) == 1
assert len(tf_report.failed_checks) == 0
assert len(tf_report.skipped_checks) == 0
assert len(tf_report.parsing_errors) == 0
Expand Down Expand Up @@ -109,7 +109,7 @@ def test_batch_resources(mocker: MockerFixture, graph_framework):
sca_image_report = next(report for report in reports if report.check_type == CheckType.SCA_IMAGE)

assert len(tf_report.resources) == 1
assert len(tf_report.passed_checks) == 1
assert len(tf_report.passed_checks) == 2
assert len(tf_report.failed_checks) == 0
assert len(tf_report.skipped_checks) == 0
assert len(tf_report.parsing_errors) == 0
Expand Down Expand Up @@ -151,7 +151,7 @@ def test_codebuild_resources(mocker: MockerFixture, graph_framework):
sca_image_report = next(report for report in reports if report.check_type == CheckType.SCA_IMAGE)

assert len(tf_report.resources) == 3
assert len(tf_report.passed_checks) == 8
assert len(tf_report.passed_checks) == 9
assert len(tf_report.failed_checks) == 2
assert len(tf_report.skipped_checks) == 0
assert len(tf_report.parsing_errors) == 0
Expand Down Expand Up @@ -195,7 +195,7 @@ def test_ecs_resources(mocker: MockerFixture, graph_framework):
sca_image_report = next(report for report in reports if report.check_type == CheckType.SCA_IMAGE)

assert len(tf_report.resources) == 1
assert len(tf_report.passed_checks) == 4
assert len(tf_report.passed_checks) == 5
assert len(tf_report.failed_checks) == 1
assert len(tf_report.skipped_checks) == 0
assert len(tf_report.parsing_errors) == 0
Expand Down Expand Up @@ -240,7 +240,7 @@ def test_lightsail_resources(mocker: MockerFixture, graph_framework):
sca_image_report = next(report for report in reports if report.check_type == CheckType.SCA_IMAGE)

assert len(tf_report.resources) == 2
assert len(tf_report.passed_checks) == 0
assert len(tf_report.passed_checks) == 1
assert len(tf_report.failed_checks) == 0
assert len(tf_report.skipped_checks) == 0
assert len(tf_report.parsing_errors) == 0
Expand Down
2 changes: 1 addition & 1 deletion tests/terraform/runner/test_plan_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def test_runner_child_modules(self):
self.assertEqual(report.get_exit_code({'soft_fail': True, 'soft_fail_checks': [], 'soft_fail_threshold': None, 'hard_fail_checks': [], 'hard_fail_threshold': None}), 0)

self.assertEqual(report.get_summary()["failed"], 3)
self.assertEqual(report.get_summary()["passed"], 4)
self.assertEqual(report.get_summary()["passed"], 5)

def test_runner_nested_child_modules(self):
current_dir = os.path.dirname(os.path.realpath(__file__))
Expand Down

0 comments on commit 558e405

Please sign in to comment.