Skip to content

Commit

Permalink
#142 Fixed deploy test
Browse files Browse the repository at this point in the history
  • Loading branch information
ahsimb committed Oct 10, 2024
1 parent a702701 commit 79d3ec7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions exasol_sagemaker_extension/deployment/language_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ def language_container_factory():
yield container_builder


def export_slc(export_dir: str):
def export_slc(export_dir: str) -> str:
if not os.path.isdir(export_dir):
os.makedirs(export_dir)
with language_container_factory() as container_builder:
container_builder.export(export_dir)
export_result = container_builder.export(export_dir)
export_info = export_result.export_infos[str(container_builder.flavor_path)]["release"]
return export_info.cache_file


if __name__ == '__main__':
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/deployment/test_deploy_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ def std_param_to_opt(std_param: StdParams) -> str:
# This method should be implemented in the StdParams
return f'--{std_param.name.replace("_", "-")}'

export_slc(str(tmp_path))
container_file = export_slc(str(tmp_path))

args_string = (f'{cli_args} '
f'{std_param_to_opt(StdParams.schema)} "{DB_SCHEMA}" '
f'{std_param_to_opt(StdParams.container_file)} "{tmp_path}"')
f'{std_param_to_opt(StdParams.container_file)} "{container_file}"')

runner = CliRunner()
result = runner.invoke(deploy_command, args=args_string, catch_exceptions=False)
Expand Down

0 comments on commit 79d3ec7

Please sign in to comment.