diff --git a/exasol_sagemaker_extension/deployment/deploy_create_statements.py b/exasol_sagemaker_extension/deployment/deploy_create_statements.py index e25a812c..fec588e3 100644 --- a/exasol_sagemaker_extension/deployment/deploy_create_statements.py +++ b/exasol_sagemaker_extension/deployment/deploy_create_statements.py @@ -1,16 +1,18 @@ import logging +import ssl + import pyexasol from exasol_sagemaker_extension.deployment import constants -from exasol_sagemaker_extension.deployment.\ +from exasol_sagemaker_extension.deployment. \ generate_create_statement_autopilot_endpoint_deletion \ import AutopilotEndpointDeletionLuaScriptCreateStatementGenerator -from exasol_sagemaker_extension.deployment.\ +from exasol_sagemaker_extension.deployment. \ generate_create_statement_autopilot_job_status_polling import \ AutopilotJobStatusPollingLuaScriptCreateStatementGenerator from exasol_sagemaker_extension.deployment. \ generate_create_statement_autopilot_training \ import AutopilotTrainingLuaScriptCreateStatementGenerator -from exasol_sagemaker_extension.deployment.\ +from exasol_sagemaker_extension.deployment. \ generate_create_statement_autopilot_endpoint_deployment \ import AutopilotEndpointDeploymentLuaScriptCreateStatementGenerator @@ -37,7 +39,12 @@ def __init__(self, db_host: str, db_port: str, db_user: str, db_pass: str, host=self._db_host, port=self._db_port), user=self._db_user, password=self._db_pass, - compression=True) + compression=True, + encryption=True, + websocket_sslopt={ + "cert_reqs": ssl.CERT_NONE, + } + ) @property def statement_maps(self): @@ -55,16 +62,16 @@ def statement_maps(self): stmt_lua_texts = { "Create statement of autopilot training lua script": constants.CREATE_STATEMENT_AUTOPILOT_TRAINING_LUA_SCRIPT_PATH. - read_text(), + read_text(), "Create statement of autopilot job status polling lua script": constants.CREATE_STATEMENT_AUTOPILOT_JOB_STATUS_POLLING_LUA_SCRIPT_PATH. - read_text(), + read_text(), "Create statement of autopilot endpoint deployment lua script": constants.CREATE_STATEMENT_AUTOPILOT_ENDPOINT_DEPLOYMENT_LUA_SCRIPT_PATH. - read_text(), + read_text(), "Create statement of autopilot endpoint deletion lua script": constants.CREATE_STATEMENT_AUTOPILOT_ENDPOINT_DELETION_LUA_SCRIPT_PATH. - read_text(), + read_text(), } stmt_create_table_texts = { @@ -123,4 +130,4 @@ def create_statements(): stmt_generator = generator() stmt_generator.save_statement() logger.debug(f"{stmt_generator.__class__.__name__} " - "is created and saved.") \ No newline at end of file + "is created and saved.") diff --git a/tests/ci_tests/fixtures/database_connection_fixture.py b/tests/ci_tests/fixtures/database_connection_fixture.py index 274aa99a..9ce2160b 100644 --- a/tests/ci_tests/fixtures/database_connection_fixture.py +++ b/tests/ci_tests/fixtures/database_connection_fixture.py @@ -1,3 +1,5 @@ +import ssl + import pyexasol import pytest from tests.ci_tests.utils.parameters import db_params @@ -10,6 +12,11 @@ def db_conn(): host=db_params.host, port=db_params.port), user=db_params.user, - password=db_params.password) + password=db_params.password, + encryption=True, + websocket_sslopt={ + "cert_reqs": ssl.CERT_NONE, + } + ) return conn diff --git a/tests/integration_tests/fixtures/database_connection_fixture.py b/tests/integration_tests/fixtures/database_connection_fixture.py index 92fac057..0b21620a 100644 --- a/tests/integration_tests/fixtures/database_connection_fixture.py +++ b/tests/integration_tests/fixtures/database_connection_fixture.py @@ -1,3 +1,5 @@ +import ssl + import pyexasol import pytest from tests.integration_tests.utils.parameters import db_params @@ -10,6 +12,11 @@ def db_conn(): host=db_params.host, port=db_params.port), user=db_params.user, - password=db_params.password) + password=db_params.password, + encryption=True, + websocket_sslopt={ + "cert_reqs": ssl.CERT_NONE, + } + ) return conn