From 95b37d3ec08f956fea4f8f40b6c51860a8dd887b Mon Sep 17 00:00:00 2001 From: Leonardo Gama Date: Thu, 3 Aug 2023 09:30:28 -0700 Subject: [PATCH 1/2] Fix failing integration test --- tests/integration/deploy/test_deploy_command.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/deploy/test_deploy_command.py b/tests/integration/deploy/test_deploy_command.py index 7221c40264..f710666992 100644 --- a/tests/integration/deploy/test_deploy_command.py +++ b/tests/integration/deploy/test_deploy_command.py @@ -826,7 +826,9 @@ def test_deploy_with_invalid_config(self, template_file, config_file): deploy_process_execute = self.run_command(deploy_command_list) self.assertEqual(deploy_process_execute.process.returncode, 1) - self.assertIn("Error reading configuration: Unexpected character", str(deploy_process_execute.stderr)) + self.assertIn( + "Unexpected character", str(deploy_process_execute.stderr), "Should notify user of the parsing error." + ) @parameterized.expand([("aws-serverless-function.yaml", "samconfig-tags-list.toml")]) def test_deploy_with_valid_config_tags_list(self, template_file, config_file): From 3ea305bd0acf93e11df6e2ffed59c2aef97873ee Mon Sep 17 00:00:00 2001 From: Leonardo Gama Date: Thu, 3 Aug 2023 09:38:34 -0700 Subject: [PATCH 2/2] Be more specific with error message --- tests/integration/deploy/test_deploy_command.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/deploy/test_deploy_command.py b/tests/integration/deploy/test_deploy_command.py index f710666992..0b4327370e 100644 --- a/tests/integration/deploy/test_deploy_command.py +++ b/tests/integration/deploy/test_deploy_command.py @@ -827,7 +827,9 @@ def test_deploy_with_invalid_config(self, template_file, config_file): deploy_process_execute = self.run_command(deploy_command_list) self.assertEqual(deploy_process_execute.process.returncode, 1) self.assertIn( - "Unexpected character", str(deploy_process_execute.stderr), "Should notify user of the parsing error." + "Unexpected character: 'm' at line 2 col 11", + str(deploy_process_execute.stderr), + "Should notify user of the parsing error.", ) @parameterized.expand([("aws-serverless-function.yaml", "samconfig-tags-list.toml")])