This commit is contained in:
Sylvain LE GAL 2022-05-05 13:49:48 +02:00
parent 6af6d30d77
commit 3600c7e89c
4 changed files with 9 additions and 14 deletions

View File

@ -44,10 +44,7 @@ pytest:
# Create a postgresql container # 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 - 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 tests/cli_B_02_docker_build_test.py tests/cli_B_03_run_test.py
poetry run pytest
--cov odoo_openupgrade_wizard # tests/cli_B_04_execute_script_python_test.py
--verbose --verbose # tests/cli_B_05_upgrade_test.py
--exitfirst
tests/cli_A_init_test.py
tests/cli_B_01_get_code_test.py

View File

@ -15,6 +15,10 @@ def get_postgres_container():
return containers[0] return containers[0]
def execute_sql_file(request):
pass
def execute_sql_request(request, database="postgres"): def execute_sql_request(request, database="postgres"):
container = get_postgres_container() container = get_postgres_container()
docker_command = ( docker_command = (

View File

@ -3,10 +3,7 @@ from pathlib import Path
from . import cli_runner_invoke from . import cli_runner_invoke
def test_cli_execute_script(): def test_cli_execute_script_python():
# TODO: FIXME
# This test works locally, but doesn't work on gitlabci
output_folder_path = Path("./tests/output_B").absolute() output_folder_path = Path("./tests/output_B").absolute()
extra_script_path = Path( extra_script_path = Path(

View File

@ -9,9 +9,6 @@ from . import cli_runner_invoke
def test_cli_upgrade(): def test_cli_upgrade():
# TODO: FIXME
# This test works locally, but doesn't work on gitlabci
output_folder_path = Path("./tests/output_B").absolute() output_folder_path = Path("./tests/output_B").absolute()
db_name = "database_test_cli_upgrade" db_name = "database_test_cli_upgrade"