From 7fca87bae7e837b9fe62afdffb1434622f73c770 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Wed, 29 Jun 2022 15:50:17 +0200 Subject: [PATCH] [FIX] GREENIFY ALL THE TESTgit status! --- .../templates/scripts/post-migration.py.j2 | 4 ++++ odoo_openupgrade_wizard/tools/tools_odoo.py | 1 + tests/cli_21_generate_module_analysis_test.py | 6 ++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/odoo_openupgrade_wizard/templates/scripts/post-migration.py.j2 b/odoo_openupgrade_wizard/templates/scripts/post-migration.py.j2 index 40c3e2b..a4b3aa5 100644 --- a/odoo_openupgrade_wizard/templates/scripts/post-migration.py.j2 +++ b/odoo_openupgrade_wizard/templates/scripts/post-migration.py.j2 @@ -4,3 +4,7 @@ _logger = logging.getLogger(__name__) _logger.info("Executing post-migration.py script ...") env = env # noqa: F821 + +# Write custom script here + +env.cr.commit() diff --git a/odoo_openupgrade_wizard/tools/tools_odoo.py b/odoo_openupgrade_wizard/tools/tools_odoo.py index bebf48b..3d41e19 100644 --- a/odoo_openupgrade_wizard/tools/tools_odoo.py +++ b/odoo_openupgrade_wizard/tools/tools_odoo.py @@ -166,6 +166,7 @@ def run_odoo( database=database, execution_context=execution_context, alternative_xml_rpc_port=alternative_xml_rpc_port, + links=links, ) diff --git a/tests/cli_21_generate_module_analysis_test.py b/tests/cli_21_generate_module_analysis_test.py index 013bd58..eaf5ae5 100644 --- a/tests/cli_21_generate_module_analysis_test.py +++ b/tests/cli_21_generate_module_analysis_test.py @@ -10,16 +10,14 @@ from . import ( def test_cli_generate_module_analysis(): - # hum... TODO fix me what this test is broken... - return move_to_test_folder() db_name = "database_test_cli___generate_module_analysis" ctx = build_ctx_from_config_file() # identify main analysis file of openupgrade - analysis_file_path = get_odoo_env_path(ctx, 14.0) / Path( + analysis_file_path = get_odoo_env_path(ctx, 15.0) / Path( "src/openupgrade/openupgrade_scripts/scripts" - "/base/14.0.1.3/upgrade_general_log.txt" + "/base/15.0.1.3/upgrade_general_log.txt" ) # We remove this file and run the analysis