diff --git a/tests/integration/buildcmd/build_integ_base.py b/tests/integration/buildcmd/build_integ_base.py index ea1db08554..ffa3398519 100644 --- a/tests/integration/buildcmd/build_integ_base.py +++ b/tests/integration/buildcmd/build_integ_base.py @@ -777,8 +777,7 @@ def _verify_process_code_and_output(self, command_result): # check HelloWorld and HelloMars functions are built in the same build self.assertRegex( command_result.stderr.decode("utf-8"), - "Building codeuri: .* runtime: .* metadata: .* functions: " - "\\['HelloWorldFunction', 'HelloMarsFunction'\\]", + "Building codeuri: .* runtime: .* metadata: .* functions: " "HelloWorldFunction, HelloMarsFunction", ) @@ -861,7 +860,7 @@ def _verify_process_code_and_output(self, command_result, function_full_paths, l for function_full_path in function_full_paths: self.assertRegex( command_result.stderr.decode("utf-8"), - f"Building codeuri: .* runtime: .* metadata: .* functions: \\[.*'{function_full_path}'.*\\]", + f"Building codeuri: .* runtime: .* metadata: .* functions:.*{function_full_path}.*", ) self.assertIn( f"Building layer '{layer_full_path}'", diff --git a/tests/integration/buildcmd/test_build_cmd.py b/tests/integration/buildcmd/test_build_cmd.py index 0d29fde5e6..f9089d1fa3 100644 --- a/tests/integration/buildcmd/test_build_cmd.py +++ b/tests/integration/buildcmd/test_build_cmd.py @@ -1684,7 +1684,7 @@ def test_cached_build_with_env_vars(self): LOG.info("Running Command (cache should be invalid): %s", cmdlist) command_result = run_command(cmdlist, cwd=self.working_dir) self.assertTrue( - "Cache is invalid, running build and copying resources to function build definition" + "Cache is invalid, running build and copying resources for following functions" in command_result.stderr.decode("utf-8") ) @@ -1692,7 +1692,7 @@ def test_cached_build_with_env_vars(self): command_result_with_cache = run_command(cmdlist, cwd=self.working_dir) self.assertTrue( - "Valid cache found, copying previously built resources from function build definition" + "Valid cache found, copying previously built resources for following functions" in command_result_with_cache.stderr.decode("utf-8") ) @@ -1728,8 +1728,8 @@ def test_repeated_cached_build_hits_cache(self, use_container): container_env_var="FOO=BAR" if use_container else None, ) - cache_invalid_output = "Cache is invalid, running build and copying resources to " - cache_valid_output = "Valid cache found, copying previously built resources from " + cache_invalid_output = "Cache is invalid, running build and copying resources " + cache_valid_output = "Valid cache found, copying previously built resources " LOG.info("Running Command (cache should be invalid): %s", cmdlist) command_result = run_command(cmdlist, cwd=self.working_dir).stderr.decode("utf-8") diff --git a/tests/integration/logs/test_logs_command.py b/tests/integration/logs/test_logs_command.py index 855b378daf..c3a3f24b62 100644 --- a/tests/integration/logs/test_logs_command.py +++ b/tests/integration/logs/test_logs_command.py @@ -9,7 +9,7 @@ import requests from parameterized import parameterized -from samcli.lib.utils.boto_utils import get_boto_resource_provider_with_config +from samcli.lib.utils.boto_utils import get_boto_resource_provider_with_config, get_boto_client_provider_with_config from samcli.lib.utils.cloudformation import get_resource_summaries from tests.integration.deploy.deploy_integ_base import DeployIntegBase from tests.integration.logs.logs_integ_base import LogsIntegBase, RETRY_COUNT @@ -60,7 +60,9 @@ def logs_base(self, deploy_testing_stack): deploy_result.process.returncode, 0, f"Deployment of the test stack is failed with {deploy_result.stderr}" ) stack_resource_summaries = get_resource_summaries( - get_boto_resource_provider_with_config(), LogsIntegTestCases.stack_name + get_boto_resource_provider_with_config(), + get_boto_client_provider_with_config(), + LogsIntegTestCases.stack_name, ) LogsIntegTestCases.stack_resources = { resource_full_path: stack_resource_summary.physical_resource_id diff --git a/tests/integration/sync/test_sync_adl.py b/tests/integration/sync/test_sync_adl.py index 8e3cae48d9..a0bff22a8c 100644 --- a/tests/integration/sync/test_sync_adl.py +++ b/tests/integration/sync/test_sync_adl.py @@ -11,6 +11,8 @@ @skipIf(SKIP_SYNC_TESTS, "Skip sync tests in CI/CD only") class TestSyncAdlCasesWithCodeParameter(TestSyncCodeBase): template = "template-python-no-dependencies.yaml" + folder = "code" + dependency_layer = True def test_sync_code_function_without_dependencies(self): # CFN Api call here to collect all the stack resources diff --git a/tests/integration/testdata/sync/code/before/template-python-no-dependencies.yaml b/tests/integration/testdata/sync/code/before/template-python-no-dependencies.yaml index f456c48c14..b95b0c7670 100644 --- a/tests/integration/testdata/sync/code/before/template-python-no-dependencies.yaml +++ b/tests/integration/testdata/sync/code/before/template-python-no-dependencies.yaml @@ -11,4 +11,4 @@ Resources: Properties: CodeUri: python_function_no_deps/ Handler: app.lambda_handler - Runtime: python3.9 \ No newline at end of file + Runtime: python3.7 \ No newline at end of file diff --git a/tests/integration/testdata/sync/infra/template-python-after.yaml b/tests/integration/testdata/sync/infra/template-python-after.yaml index b91dd212dc..24705c7ed2 100644 --- a/tests/integration/testdata/sync/infra/template-python-after.yaml +++ b/tests/integration/testdata/sync/infra/template-python-after.yaml @@ -31,7 +31,6 @@ Resources: HelloWorldLayer: Type: AWS::Serverless::LayerVersion Properties: - LayerName: HelloWorldLayer Description: Hello World Layer ContentUri: after/Python/layer/ CompatibleRuntimes: diff --git a/tests/integration/testdata/sync/infra/template-python-before.yaml b/tests/integration/testdata/sync/infra/template-python-before.yaml index 19ae2189db..407f643797 100644 --- a/tests/integration/testdata/sync/infra/template-python-before.yaml +++ b/tests/integration/testdata/sync/infra/template-python-before.yaml @@ -31,7 +31,6 @@ Resources: HelloWorldLayer: Type: AWS::Serverless::LayerVersion Properties: - LayerName: HelloWorldLayer Description: Hello World Layer ContentUri: before/Python/layer/ CompatibleRuntimes: diff --git a/tests/integration/testdata/sync/infra/template-ruby-after.yaml b/tests/integration/testdata/sync/infra/template-ruby-after.yaml index dc869b1691..bf3818a7f5 100644 --- a/tests/integration/testdata/sync/infra/template-ruby-after.yaml +++ b/tests/integration/testdata/sync/infra/template-ruby-after.yaml @@ -21,7 +21,6 @@ Resources: HelloWorldRubyLayer: Type: AWS::Serverless::LayerVersion Properties: - LayerName: HelloWorldRubyLayer Description: Hello World Ruby Layer ContentUri: after/Ruby/layer/ CompatibleRuntimes: diff --git a/tests/integration/testdata/sync/infra/template-ruby-before.yaml b/tests/integration/testdata/sync/infra/template-ruby-before.yaml index f5c312b2cb..c57469007e 100644 --- a/tests/integration/testdata/sync/infra/template-ruby-before.yaml +++ b/tests/integration/testdata/sync/infra/template-ruby-before.yaml @@ -21,7 +21,6 @@ Resources: HelloWorldRubyLayer: Type: AWS::Serverless::LayerVersion Properties: - LayerName: HelloWorldRubyLayer Description: Hello World Ruby Layer ContentUri: before/Ruby/layer/ CompatibleRuntimes: diff --git a/tests/integration/testdata/sync/nested/before/child_stack/template.yaml b/tests/integration/testdata/sync/nested/before/child_stack/template.yaml index bdd94e5c7e..91caa7142a 100644 --- a/tests/integration/testdata/sync/nested/before/child_stack/template.yaml +++ b/tests/integration/testdata/sync/nested/before/child_stack/template.yaml @@ -29,7 +29,6 @@ Resources: HelloWorldLayer: Type: AWS::Serverless::LayerVersion Properties: - LayerName: HelloWorldLayer Description: Hello World Layer # Currently if a base_dir option is provided, the nested stack code URIs # Needs to be relative to the base_dir instead of the child templates diff --git a/tests/integration/testdata/sync/nested/before/template.yaml b/tests/integration/testdata/sync/nested/before/template.yaml index 8466d25b19..7afeb10382 100644 --- a/tests/integration/testdata/sync/nested/before/template.yaml +++ b/tests/integration/testdata/sync/nested/before/template.yaml @@ -19,7 +19,6 @@ Resources: HelloWorldLayer: Type: AWS::Serverless::LayerVersion Properties: - LayerName: HelloWorldLayer Description: Hello World Layer ContentUri: root_layer/ CompatibleRuntimes: diff --git a/tests/integration/testdata/sync/nested_intrinsics/before/child_stack/child_layer/template.yaml b/tests/integration/testdata/sync/nested_intrinsics/before/child_stack/child_layer/template.yaml index e0a43abef9..6c2089f68d 100644 --- a/tests/integration/testdata/sync/nested_intrinsics/before/child_stack/child_layer/template.yaml +++ b/tests/integration/testdata/sync/nested_intrinsics/before/child_stack/child_layer/template.yaml @@ -5,7 +5,6 @@ Resources: HelloWorldLayer: Type: AWS::Serverless::LayerVersion Properties: - LayerName: HelloWorldLayer Description: Hello World Layer ContentUri: layer/ CompatibleRuntimes: