From 725d48c0db8da57f33c81a5722df968e529b3467 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Fri, 20 Oct 2023 11:23:35 +0100 Subject: [PATCH] Configure temporary whoosh_index_dir for tests Otherwise a `/database/toolshed_whoosh_indexes` would be reused, leading to failing tests when running tests locally. --- lib/tool_shed/test/base/driver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/tool_shed/test/base/driver.py b/lib/tool_shed/test/base/driver.py index 6f56751f39cc..b342a749f591 100644 --- a/lib/tool_shed/test/base/driver.py +++ b/lib/tool_shed/test/base/driver.py @@ -80,11 +80,11 @@ def _setup_local(self): os.environ["GALAXY_TEST_TOOL_DATA_PATH"] = tool_data_path galaxy_db_path = driver_util.database_files_path(tool_shed_test_tmp_dir) shed_file_path = os.path.join(shed_db_path, "files") - hgweb_config_file_path = tempfile.mkdtemp(dir=tool_shed_test_tmp_dir) + whoosh_index_dir = os.path.join(shed_db_path, "toolshed_whoosh_indexes") + hgweb_config_dir = tempfile.mkdtemp(dir=tool_shed_test_tmp_dir) new_repos_path = tempfile.mkdtemp(dir=tool_shed_test_tmp_dir) galaxy_shed_tool_path = tempfile.mkdtemp(dir=tool_shed_test_tmp_dir) galaxy_migrated_tool_path = tempfile.mkdtemp(dir=tool_shed_test_tmp_dir) - hgweb_config_dir = hgweb_config_file_path os.environ["TEST_HG_WEB_CONFIG_DIR"] = hgweb_config_dir print("Directory location for hgweb.config:", hgweb_config_dir) toolshed_database_conf = driver_util.database_conf(shed_db_path, prefix="TOOL_SHED") @@ -104,6 +104,7 @@ def _setup_local(self): smtp_server="smtp.dummy.string.tld", email_from="functional@localhost", use_heartbeat=False, + whoosh_index_dir=whoosh_index_dir, ) kwargs.update(toolshed_database_conf) # Generate the tool_data_table_conf.xml file.