Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions tests/integration/buildcmd/build_integ_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)


Expand Down Expand Up @@ -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}'",
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/buildcmd/test_build_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1684,15 +1684,15 @@ 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")
)

LOG.info("Re-Running Command (valid cache should exist): %s", cmdlist)
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")
)

Expand Down Expand Up @@ -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")
Expand Down
6 changes: 4 additions & 2 deletions tests/integration/logs/test_logs_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/sync/test_sync_adl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Resources:
Properties:
CodeUri: python_function_no_deps/
Handler: app.lambda_handler
Runtime: python3.9
Runtime: python3.7
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Resources:
HelloWorldLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: HelloWorldLayer
Description: Hello World Layer
ContentUri: after/Python/layer/
CompatibleRuntimes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Resources:
HelloWorldLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: HelloWorldLayer
Description: Hello World Layer
ContentUri: before/Python/layer/
CompatibleRuntimes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Resources:
HelloWorldRubyLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: HelloWorldRubyLayer
Description: Hello World Ruby Layer
ContentUri: after/Ruby/layer/
CompatibleRuntimes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Resources:
HelloWorldRubyLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: HelloWorldRubyLayer
Description: Hello World Ruby Layer
ContentUri: before/Ruby/layer/
CompatibleRuntimes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Resources:
HelloWorldLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: HelloWorldLayer
Description: Hello World Layer
ContentUri: root_layer/
CompatibleRuntimes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Resources:
HelloWorldLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: HelloWorldLayer
Description: Hello World Layer
ContentUri: layer/
CompatibleRuntimes:
Expand Down