Skip to content

Commit 27e09b8

Browse files
committed
test(integration): add --language-extensions to invoke/start-api commands and fix deploy test
1 parent 44962bf commit 27e09b8

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

tests/integration/deploy/test_deploy_command.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
RUN_BY_CANARY,
2121
SKIP_LMI_TESTS,
2222
UpdatableSARTemplate,
23+
get_sam_command,
2324
)
2425

2526
# Deploy tests require credentials and CI/CD will only add credentials to the env if the PR is from the same repo.
@@ -1719,7 +1720,8 @@ def test_deploy_with_language_extensions(self):
17191720

17201721
# Build first — sam deploy of a raw ForEach template requires a build step
17211722
build_dir = tempfile.mkdtemp()
1722-
build_command_list = self.base_command_list + [
1723+
build_command_list = [
1724+
get_sam_command(),
17231725
"build",
17241726
"-t",
17251727
str(template),

tests/integration/local/invoke/test_invoke_language_extensions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_invoke_foreach_expanded_function(self):
7575
function_to_invoke="AlphaFunction",
7676
template_path=str(self.built_template_path),
7777
no_event=True,
78-
)
78+
) + ["--language-extensions"]
7979
stdout, stderr, invoke_exit_code = self.run_command(invoke_command, cwd=self.working_dir)
8080

8181
self.assertEqual(invoke_exit_code, 0, f"invoke failed: stdout={stdout}, stderr={stderr}")

tests/integration/local/start_api/test_start_api_language_extensions.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ def setUpClass(cls):
2727
cls.build_overrides = {"Runtime": python_version}
2828
super().setUpClass()
2929

30+
@classmethod
31+
def start_api(cls):
32+
command = get_sam_command()
33+
cls.command_list = [command, "local", "start-api", "-t", cls.template, "--language-extensions"]
34+
super().start_api()
35+
3036
@classmethod
3137
def build(cls):
3238
command = get_sam_command()

0 commit comments

Comments
 (0)