From ceb42452fdae64a19bb3c36af51f1746a4d5ea7c Mon Sep 17 00:00:00 2001 From: Torsten Kilias Date: Fri, 5 Jan 2024 08:11:44 +0100 Subject: [PATCH] Rename get_language_activation to get_language_definition --- .../deployment/language_container_deployer.py | 7 ++++++- .../deployment/test_language_container_deployer.py | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/exasol_transformers_extension/deployment/language_container_deployer.py b/exasol_transformers_extension/deployment/language_container_deployer.py index c21aeb0b..d3d3170f 100644 --- a/exasol_transformers_extension/deployment/language_container_deployer.py +++ b/exasol_transformers_extension/deployment/language_container_deployer.py @@ -213,7 +213,12 @@ def _update_previous_language_settings(self, alter_type: LanguageActivationLevel path_in_udf, prev_lang_aliases) return new_definitions_str - def get_language_activation(self, bucket_file_path: str): + def get_language_definition(self, bucket_file_path: str): + """ + Generate a language definition (ALIAS=URL) for the specified bucket file path. + + bucket_file_path - Path within the designated bucket where the container is uploaded. + """ path_in_udf = self._bucketfs_location.generate_bucket_udf_path(bucket_file_path) result = self._generate_new_language_settings(path_in_udf=path_in_udf, prev_lang_aliases=[]) return result diff --git a/tests/unit_tests/deployment/test_language_container_deployer.py b/tests/unit_tests/deployment/test_language_container_deployer.py index 3b4359d8..746c442b 100644 --- a/tests/unit_tests/deployment/test_language_container_deployer.py +++ b/tests/unit_tests/deployment/test_language_container_deployer.py @@ -124,10 +124,10 @@ def test_slc_deployer_generate_activation_command_failure(mock_lang_settings, co allow_override=False) -def test_slc_deployer_get_language_activation(container_deployer, language_alias, +def test_slc_deployer_get_language_definition(container_deployer, language_alias, container_file_name, container_bfs_path): expected_command = f"{language_alias}=localzmq+protobuf:///{container_bfs_path}?" \ f"lang=python#/buckets/{container_bfs_path}/exaudf/exaudfclient_py3" - command = container_deployer.get_language_activation(container_file_name) + command = container_deployer.get_language_definition(container_file_name) assert command == expected_command