Skip to content

Commit

Permalink
Configure temporary whoosh_index_dir for tests
Browse files Browse the repository at this point in the history
Otherwise a `<GALAXY_ROOT>/database/toolshed_whoosh_indexes` would
be reused, leading to failing tests when running tests locally.
  • Loading branch information
nsoranzo committed Oct 20, 2023
1 parent bdcc331 commit 048d792
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/tool_shed/test/base/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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.
Expand Down

0 comments on commit 048d792

Please sign in to comment.