From a6b8128b29f617c2ee5ad86d06eb4d8b5aa4cabc Mon Sep 17 00:00:00 2001 From: Tim Pansino Date: Thu, 18 Jan 2024 14:28:41 -0800 Subject: [PATCH] Correct install status for unsupported runtimes --- newrelic_lambda_cli/layers.py | 2 +- tests/test_layers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/newrelic_lambda_cli/layers.py b/newrelic_lambda_cli/layers.py index 755d0c7..d3cb384 100644 --- a/newrelic_lambda_cli/layers.py +++ b/newrelic_lambda_cli/layers.py @@ -89,7 +89,7 @@ def _add_new_relic(input, config, nr_license_key): "Unsupported Lambda runtime for '%s': %s" % (config["Configuration"]["FunctionArn"], runtime) ) - return True + return False architectures = config["Configuration"].get("Architectures", ["x86_64"]) architecture = architectures[0] diff --git a/tests/test_layers.py b/tests/test_layers.py index 7ec4943..467a5fe 100644 --- a/tests/test_layers.py +++ b/tests/test_layers.py @@ -71,7 +71,7 @@ def test_add_new_relic(aws_credentials, mock_function_config): config, nr_license_key=None, ) - is True + is False ) config = mock_function_config("python3.12")