From 2ed5864df10b90c48d6f8f532bca97b2fe1e4621 Mon Sep 17 00:00:00 2001 From: LirShindalman <49649760+lirshindalman@users.noreply.github.com> Date: Tue, 1 Aug 2023 14:03:56 +0300 Subject: [PATCH] fix(terraform): pr for upgrade-checkov (#5400) . --- tests/terraform/runner/test_runner.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/terraform/runner/test_runner.py b/tests/terraform/runner/test_runner.py index 27ce327272d..9b0384a4f5c 100644 --- a/tests/terraform/runner/test_runner.py +++ b/tests/terraform/runner/test_runner.py @@ -1764,7 +1764,6 @@ def test_entity_context_fetching_with_TFDefinitionKey(self): runner.context = {full_file_path: {'resource': {'aws_lb_listener': {'https1': {'start_line': 1, 'end_line': 7, 'code_lines': [[1, 'resource "aws_lb_listener" "https1" {\n'], [2, ' load_balancer_arn = ""\n'], [3, ' protocol = "HTTPS"\n'], [4, ' default_action {\n'], [5, ' type = ""\n'], [6, ' }\n'], [7, '}']], 'skipped_checks': []}}}}} entity_with_found_path = {'block_name_': 'aws_lb_listener.https1', 'block_type_': 'resource', 'file_path_': '/tmp/checkov/1069803756901857280/prisma-new-user/TestAutomationRepo_7-30-2023-1-38-24-PM/pr/4/58a43cb0e5daee00398b6c892c9287438c7c74ea/diff/src/file1.tf', 'config_': {'aws_lb_listener': {'https1': {'__end_line__': 7, '__start_line__': 1, 'default_action': [{'type': ['']}], 'load_balancer_arn': [''], 'protocol': ['HTTPS'], '__address__': 'aws_lb_listener.https1'}}}, 'attributes_': {'__end_line__': 7, '__start_line__': 1, 'default_action': {'type': ''}, 'load_balancer_arn': [''], 'protocol': ['HTTPS'], 'resource_type': ['aws_lb_listener'], 'default_action.type': '', '__address__': 'aws_lb_listener.https1'}, 'label_': 'resource: aws_lb_listener.https1', 'id_': 'aws_lb_listener.https1', 'customer_name_': '1069803756901857280', 'account_id_': 'prisma-new-user/TestAutomationRepo_7-30-2023-1-38-24-PM/CICD/243676', 'unique_tag_': 'prod', 'source_': 'terraform', 'violations_count_': 0, 'region_': '', '__end_line__': 7, '__start_line__': 1, 'default_action': {'type': ''}, 'default_action.type': '', 'load_balancer_arn': '', 'protocol': 'HTTPS', 'resource_type': 'aws_lb_listener', '__address__': 'aws_lb_listener.https1', 'module_dependency_': '', 'module_dependency_num_': '', 'hash': 'd61bc3a35537776896f83679a51e63d3a6074f66b368bc4fea07871d282875e9'} entity_context = runner.get_entity_context_and_evaluations(entity_with_found_path) - assert entity_context is not None assert entity_context['start_line'] == 1 and entity_context['end_line'] == 7