diff --git a/samcli/lib/sync/infra_sync_executor.py b/samcli/lib/sync/infra_sync_executor.py index 15e166c2dd2..2198dec0e09 100644 --- a/samcli/lib/sync/infra_sync_executor.py +++ b/samcli/lib/sync/infra_sync_executor.py @@ -72,7 +72,7 @@ class InfraSyncResult: _infra_sync_executed: bool _code_sync_resources: Set[ResourceIdentifier] - def __init__(self, executed: bool, code_sync_resources: Set[ResourceIdentifier] = set()) -> None: + def __init__(self, executed: bool, code_sync_resources: Optional[Set[ResourceIdentifier]] = None) -> None: """ Constructor @@ -83,6 +83,8 @@ def __init__(self, executed: bool, code_sync_resources: Set[ResourceIdentifier] code_sync_resources: Set[ResourceIdentifier] Resources that needs a code sync """ + if code_sync_resources is None: + code_sync_resources = set() self._infra_sync_executed = executed self._code_sync_resources = code_sync_resources diff --git a/tests/integration/durable_integ_base.py b/tests/integration/durable_integ_base.py index 99f6abe2f9a..bfe7a4db728 100644 --- a/tests/integration/durable_integ_base.py +++ b/tests/integration/durable_integ_base.py @@ -1,19 +1,18 @@ import json -import os import re import shutil import threading import time from pathlib import Path -from subprocess import Popen, PIPE, STDOUT, TimeoutExpired -from typing import Dict, Any, Optional, List +from subprocess import PIPE, STDOUT, Popen +from typing import Any, Dict, List, Optional from unittest import TestCase from tests.integration.local.invoke.invoke_integ_base import TIMEOUT from tests.testing_utils import ( - run_command, - get_sam_command, get_build_command_list, + get_sam_command, + run_command, ) @@ -143,11 +142,13 @@ def log_output(): def assert_invoke_output( self, stdout: str, - input_data: Dict[str, Any] = {}, + input_data: Optional[Dict[str, Any]] = None, execution_name: Optional[str] = None, expected_status: str = "SUCCEEDED", ) -> str: """Assert invoke output contains expected fields and return execution ARN.""" + if input_data is None: + input_data = {} stdout_str = stdout.strip() self.assertIn("Execution Summary:", stdout_str, f"Expected execution summary in output: {stdout_str}") diff --git a/tests/integration/testdata/buildcmd/asset.b998895901bf33127f2c9dce715854f8b35aa73fb7eb5245ba9721580bbe5837/requirements.txt b/tests/integration/testdata/buildcmd/asset.b998895901bf33127f2c9dce715854f8b35aa73fb7eb5245ba9721580bbe5837/requirements.txt index fd60a205345..569c40587ac 100644 --- a/tests/integration/testdata/buildcmd/asset.b998895901bf33127f2c9dce715854f8b35aa73fb7eb5245ba9721580bbe5837/requirements.txt +++ b/tests/integration/testdata/buildcmd/asset.b998895901bf33127f2c9dce715854f8b35aa73fb7eb5245ba9721580bbe5837/requirements.txt @@ -1,3 +1,3 @@ numpy<1.20.3; python_version < '3.10' numpy==1.26.4; python_version >= '3.10' -cryptography==3.3.2 \ No newline at end of file +cryptography==46.0.6 \ No newline at end of file diff --git a/tests/integration/testdata/sync/nested_intrinsics/before/child_stack/child_function/function/requirements.txt b/tests/integration/testdata/sync/nested_intrinsics/before/child_stack/child_function/function/requirements.txt index 5b6dce93d53..6e692170a02 100644 --- a/tests/integration/testdata/sync/nested_intrinsics/before/child_stack/child_function/function/requirements.txt +++ b/tests/integration/testdata/sync/nested_intrinsics/before/child_stack/child_function/function/requirements.txt @@ -1,2 +1,2 @@ numpy<=2.2.6 -requests \ No newline at end of file +requests==2.33.0 \ No newline at end of file diff --git a/tests/regression/deploy/regression_deploy_base.py b/tests/regression/deploy/regression_deploy_base.py index 2154ad69100..34f02b97200 100644 --- a/tests/regression/deploy/regression_deploy_base.py +++ b/tests/regression/deploy/regression_deploy_base.py @@ -1,5 +1,5 @@ import os -from subprocess import Popen, PIPE, TimeoutExpired +from subprocess import PIPE, Popen, TimeoutExpired from unittest import TestCase TIMEOUT = 300 @@ -85,7 +85,9 @@ def get_deploy_command_list( return command_list - def deploy_regression_check(self, args, sam_return_code=0, aws_return_code=0, commands=[]): + def deploy_regression_check(self, args, sam_return_code=0, aws_return_code=0, commands=None): + if commands is None: + commands = [] sam_stack_name = args.get("sam_stack_name", None) aws_stack_name = args.get("aws_stack_name", None) if sam_stack_name: