From 3600c7e89c525c5483e3a77c0d5dd05b9b48d3ee Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Thu, 5 May 2022 13:49:48 +0200 Subject: [PATCH] wip --- .gitlab-ci.yml | 11 ++++------- odoo_openupgrade_wizard/tools_postgres.py | 4 ++++ tests/cli_B_04_execute_script_python_test.py | 5 +---- tests/cli_B_05_upgrade_test.py | 3 --- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ac11db4..edf3647 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,10 +44,7 @@ pytest: # Create a postgresql container - docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --publish 9542:5432 --name db postgres:13 - - | - poetry run pytest - --cov odoo_openupgrade_wizard - --verbose --verbose - --exitfirst - tests/cli_A_init_test.py - tests/cli_B_01_get_code_test.py + - poetry run pytest --cov odoo_openupgrade_wizard --verbose --verbose --exitfirst tests/cli_A_init_test.py tests/cli_B_01_get_code_test.py tests/cli_B_02_docker_build_test.py tests/cli_B_03_run_test.py + + # tests/cli_B_04_execute_script_python_test.py + # tests/cli_B_05_upgrade_test.py diff --git a/odoo_openupgrade_wizard/tools_postgres.py b/odoo_openupgrade_wizard/tools_postgres.py index bff7289..4a73cad 100644 --- a/odoo_openupgrade_wizard/tools_postgres.py +++ b/odoo_openupgrade_wizard/tools_postgres.py @@ -15,6 +15,10 @@ def get_postgres_container(): return containers[0] +def execute_sql_file(request): + pass + + def execute_sql_request(request, database="postgres"): container = get_postgres_container() docker_command = ( diff --git a/tests/cli_B_04_execute_script_python_test.py b/tests/cli_B_04_execute_script_python_test.py index a7923d7..50d4775 100644 --- a/tests/cli_B_04_execute_script_python_test.py +++ b/tests/cli_B_04_execute_script_python_test.py @@ -3,10 +3,7 @@ from pathlib import Path from . import cli_runner_invoke -def test_cli_execute_script(): - # TODO: FIXME - # This test works locally, but doesn't work on gitlabci - +def test_cli_execute_script_python(): output_folder_path = Path("./tests/output_B").absolute() extra_script_path = Path( diff --git a/tests/cli_B_05_upgrade_test.py b/tests/cli_B_05_upgrade_test.py index 4abcd5b..9c18504 100644 --- a/tests/cli_B_05_upgrade_test.py +++ b/tests/cli_B_05_upgrade_test.py @@ -9,9 +9,6 @@ from . import cli_runner_invoke def test_cli_upgrade(): - # TODO: FIXME - # This test works locally, but doesn't work on gitlabci - output_folder_path = Path("./tests/output_B").absolute() db_name = "database_test_cli_upgrade"