From 8ec6f9db007168ce9c97fbfc7379265982900012 Mon Sep 17 00:00:00 2001 From: mibe Date: Thu, 26 Sep 2024 12:35:34 +0100 Subject: [PATCH] #140 Added the itde nameserver --- .github/workflows/build.yaml | 2 +- tests/deployment/test_deploy_cli.py | 2 +- tests/deployment/test_deploy_create_statements.py | 4 +++- tests/fixtures/prepare_environment_fixture.py | 4 +++- tests/fixtures/script_deployment_fixture.py | 4 +--- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9b8d82a..56fbb81 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -75,4 +75,4 @@ jobs: PYTEST_ADDOPTS: '${{ steps.pytest-markers.outputs.slow-tests }}' run: | echo "PYTEST_ADDOPTS = $PYTEST_ADDOPTS" - poetry run pytest --backend=onprem tests + poetry run pytest --backend=onprem --itde-nameserver="8.8.8.8" tests diff --git a/tests/deployment/test_deploy_cli.py b/tests/deployment/test_deploy_cli.py index d13bb7f..4aaf98d 100644 --- a/tests/deployment/test_deploy_cli.py +++ b/tests/deployment/test_deploy_cli.py @@ -1,6 +1,5 @@ import pytest from click.testing import CliRunner -import exasol.bucketfs as bfs from exasol_sagemaker_extension.deployment import deploy_cli from tests.ci_tests.utils.parameters import get_arg_list @@ -41,6 +40,7 @@ def get_all_scripts(db_conn): def test_deploy_cli_main(pyexasol_connection, deploy_params): args_list = get_arg_list(**deploy_params, schema=DB_SCHEMA) + args_list.append("--no-use-ssl-cert-validation") runner = CliRunner() result = runner.invoke(deploy_cli.main, args_list) diff --git a/tests/deployment/test_deploy_create_statements.py b/tests/deployment/test_deploy_create_statements.py index 6dca6f0..6598769 100644 --- a/tests/deployment/test_deploy_create_statements.py +++ b/tests/deployment/test_deploy_create_statements.py @@ -31,7 +31,9 @@ def get_all_scripts(db_conn): @pytest.mark.slow def test_deploy_create_statements(pyexasol_connection, deploy_params): - DeployCreateStatements.create_and_run(**deploy_params, schema=DB_SCHEMA) + DeployCreateStatements.create_and_run(**deploy_params, + use_ssl_cert_validation=False, + schema=DB_SCHEMA) all_schemas = get_all_schemas(pyexasol_connection) all_scripts = get_all_scripts(pyexasol_connection) diff --git a/tests/fixtures/prepare_environment_fixture.py b/tests/fixtures/prepare_environment_fixture.py index 67ae094..c960c03 100644 --- a/tests/fixtures/prepare_environment_fixture.py +++ b/tests/fixtures/prepare_environment_fixture.py @@ -39,7 +39,9 @@ def _insert_into_tables(db_conn, model_setup): def _setup_database(db_conn: pyexasol.ExaConnection, deploy_params: dict[str, Any]): for model_setup in [reg_model_setup_params, cls_model_setup_params]: _open_schema(db_conn, model_setup) - DeployCreateStatements.create_and_run(**deploy_params, schema=model_setup.schema_name) + DeployCreateStatements.create_and_run(**deploy_params, + use_ssl_cert_validation=False, + schema=model_setup.schema_name) _create_tables(db_conn, model_setup) _insert_into_tables(db_conn, model_setup) diff --git a/tests/fixtures/script_deployment_fixture.py b/tests/fixtures/script_deployment_fixture.py index 73e111e..26ec05d 100644 --- a/tests/fixtures/script_deployment_fixture.py +++ b/tests/fixtures/script_deployment_fixture.py @@ -29,6 +29,4 @@ def _translate_params(source: dict[str, Any], param_map: dict[str, str]) -> dict @pytest.fixture(scope="session") def deploy_params(backend_aware_database_params, deployed_slc) -> dict[str, Any]: - d_params = _translate_params(backend_aware_database_params, _deploy_param_map) - d_params['use_ssl_cert_validation'] = False - return d_params + return _translate_params(backend_aware_database_params, _deploy_param_map)