Skip to content

Commit 44962bf

Browse files
committed
test(deploy): add build step to LE deploy integration test
1 parent 8f28988 commit 44962bf

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

tests/integration/deploy/test_deploy_command.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,10 +1717,23 @@ def test_deploy_with_language_extensions(self):
17171717
stack_name = self._method_to_stack_name(self.id())
17181718
self.stacks.append({"name": stack_name})
17191719

1720+
# Build first — sam deploy of a raw ForEach template requires a build step
1721+
build_dir = tempfile.mkdtemp()
1722+
build_command_list = self.base_command_list + [
1723+
"build",
1724+
"-t",
1725+
str(template),
1726+
"-b",
1727+
build_dir,
1728+
"--language-extensions",
1729+
]
1730+
build_process = self.run_command(build_command_list)
1731+
self.assertEqual(build_process.process.returncode, 0, f"Build failed: {build_process.stderr}")
1732+
1733+
built_template = Path(build_dir) / "template.yaml"
17201734
deploy_command_list = self.get_deploy_command_list(
1721-
template_file=template, stack_name=stack_name, s3_prefix=self.s3_prefix, capabilities="CAPABILITY_IAM"
1735+
template_file=built_template, stack_name=stack_name, s3_prefix=self.s3_prefix, capabilities="CAPABILITY_IAM"
17221736
)
1723-
deploy_command_list.append("--language-extensions")
17241737
deploy_process_execute = self.run_command(deploy_command_list)
17251738
self.assertEqual(deploy_process_execute.process.returncode, 0)
17261739

@@ -1867,8 +1880,6 @@ def test_package_and_deploy_language_extensions_dynamic_codeuri(self):
18671880
tags="integ=true clarity=yes foo_bar=baz",
18681881
confirm_changeset=False,
18691882
)
1870-
deploy_command_list.append("--language-extensions")
1871-
18721883
deploy_process = self.run_command(deploy_command_list)
18731884
self.assertEqual(deploy_process.process.returncode, 0)
18741885
finally:

0 commit comments

Comments
 (0)