Skip to content

Commit

Permalink
#120 Disabled all tests except script deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ahsimb committed Jul 2, 2024
1 parent ac81a99 commit 12e1026
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 23 deletions.
36 changes: 20 additions & 16 deletions exasol_sagemaker_extension/deployment/deploy_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,26 @@ def main(
logging.basicConfig(format='%(asctime)s - %(module)s - %(message)s',
level=logging.DEBUG)

DeployCreateStatements.create_and_run(
schema=schema,
dsn=dsn,
db_user=db_user,
db_pass=db_pass,
saas_url=saas_url,
saas_account_id=saas_account_id,
saas_database_id=saas_database_id,
saas_database_name=saas_database_name,
saas_token=saas_token,
use_ssl_cert_validation=use_ssl_cert_validation,
ssl_trusted_ca=ssl_cert_path,
ssl_client_certificate=ssl_client_cert_path,
ssl_private_key=ssl_client_private_key,
to_print=verbose,
develop=develop)
try:
DeployCreateStatements.create_and_run(
schema=schema,
dsn=dsn,
db_user=db_user,
db_pass=db_pass,
saas_url=saas_url,
saas_account_id=saas_account_id,
saas_database_id=saas_database_id,
saas_database_name=saas_database_name,
saas_token=saas_token,
use_ssl_cert_validation=use_ssl_cert_validation,
ssl_trusted_ca=ssl_cert_path,
ssl_client_certificate=ssl_client_cert_path,
ssl_private_key=ssl_client_private_key,
to_print=verbose,
develop=develop)
except Exception as ex:
print(ex)
raise ex


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion tests/ci_tests/test_deploying_autopilot.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _deploy_endpoint(job_name, endpoint_name, model_setup_params, ci_test_env: C
assert endpoint_name in list(map(lambda x: x[0], all_scripts))


@pytest.mark.slow
@pytest.mark.skip('Debugging')
def test_deploy_autopilot_endpoint(prepare_ci_test_environment):
curr_datetime = datetime.now().strftime("%y%m%d%H%M%S")
model_name = ''.join((cls_model_setup_params.model_type, curr_datetime))
Expand Down
2 changes: 1 addition & 1 deletion tests/ci_tests/test_polling_autopilot.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tests.ci_tests.utils.parameters import cls_model_setup_params


@pytest.mark.slow
@pytest.mark.skip('Debugging')
def test_poll_autopilot_job(prepare_ci_test_environment):
curr_datetime = datetime.now().strftime("%y%m%d%H%M%S")
model_name = ''.join((cls_model_setup_params.model_type, curr_datetime))
Expand Down
4 changes: 2 additions & 2 deletions tests/ci_tests/test_predicting_autopilot.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _make_prediction(job_name, endpoint_name, model_setup_params, ci_test_env: C
assert predictions


@pytest.mark.slow
@pytest.mark.skip('Debugging')
def test_predict_autopilot_regression_job(prepare_ci_test_environment):
curr_datetime = datetime.now().strftime("%y%m%d%H%M%S")
model_name = ''.join((reg_model_setup_params.model_type, curr_datetime))
Expand All @@ -73,7 +73,7 @@ def test_predict_autopilot_regression_job(prepare_ci_test_environment):
db_conn=prepare_ci_test_environment)


@pytest.mark.slow
@pytest.mark.skip('Debugging')
def test_predict_autopilot_classification_job(prepare_ci_test_environment):
curr_datetime = datetime.now().strftime("%y%m%d%H%M%S")
model_name = ''.join((cls_model_setup_params.model_type, curr_datetime))
Expand Down
4 changes: 2 additions & 2 deletions tests/ci_tests/test_training_autopilot.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from tests.ci_tests.utils.queries import DatabaseQueries


@pytest.mark.slow
@pytest.mark.skip('Debugging')
def test_train_autopilot_regression_job(prepare_ci_test_environment):
curr_datetime = datetime.now().strftime("%y%m%d%H%M%S")
model_name = ''.join((reg_model_setup_params.model_type, curr_datetime))
Expand All @@ -23,7 +23,7 @@ def test_train_autopilot_regression_job(prepare_ci_test_environment):
job_name, reg_model_setup_params, prepare_ci_test_environment)


@pytest.mark.slow
@pytest.mark.skip('Debugging')
def test_train_autopilot_classification_job(prepare_ci_test_environment):
curr_datetime = datetime.now().strftime("%y%m%d%H%M%S")
model_name = ''.join((cls_model_setup_params.model_type, curr_datetime))
Expand Down
5 changes: 4 additions & 1 deletion tests/deployment/test_deploy_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ def test_deploy_cli_main(backend, db_conn, deploy_params):
else:
args_list.append("--no-use-ssl-cert-validation")

print('\n************\n', args_list, '\n******************\n')

runner = CliRunner()
result = runner.invoke(deploy_cli.main, args_list, catch_exceptions=False)
result = runner.invoke(deploy_cli.main, args_list)
assert not result.exception
assert result.exit_code == 0

all_schemas = get_all_schemas(db_conn)
Expand Down

0 comments on commit 12e1026

Please sign in to comment.