From 2a47e137b4bdc1146ccd23f463370fd78c39b477 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Mon, 22 Nov 2021 15:51:52 +0100 Subject: [PATCH] try to fix toolshed tests --- lib/tool_shed/test/base/twilltestcase.py | 2 +- lib/tool_shed/test/functional_tests.py | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/tool_shed/test/base/twilltestcase.py b/lib/tool_shed/test/base/twilltestcase.py index 1b093e2ee2fa..8023b0e4da8f 100644 --- a/lib/tool_shed/test/base/twilltestcase.py +++ b/lib/tool_shed/test/base/twilltestcase.py @@ -61,7 +61,7 @@ def setUp(self): self.galaxy_url = f"http://{self.galaxy_host}:{self.galaxy_port}" self.shed_tool_data_table_conf = os.environ.get('TOOL_SHED_TEST_TOOL_DATA_TABLE_CONF') self.file_dir = os.environ.get('TOOL_SHED_TEST_FILE_DIR', None) - self.tool_data_path = os.environ.get('GALAXY_TEST_TOOL_DATA_PATH') + self.tool_data_path = os.environ.get('GALAXY_TEST_TOOL_DATA_PATH', 'test/functional/tool-data/') self.shed_tool_conf = os.environ.get('GALAXY_TEST_SHED_TOOL_CONF') self.test_db_util = test_db_util # TODO: Figure out a way to alter these attributes during tests. diff --git a/lib/tool_shed/test/functional_tests.py b/lib/tool_shed/test/functional_tests.py index 2e35eaf3488b..45133640bf4e 100644 --- a/lib/tool_shed/test/functional_tests.py +++ b/lib/tool_shed/test/functional_tests.py @@ -61,11 +61,8 @@ def setup(self): galaxy_shed_tool_conf_file = os.environ.get('GALAXY_TEST_SHED_TOOL_CONF', os.path.join(tool_shed_test_tmp_dir, 'test_shed_tool_conf.xml')) galaxy_migrated_tool_conf_file = os.environ.get('GALAXY_TEST_MIGRATED_TOOL_CONF', os.path.join(tool_shed_test_tmp_dir, 'test_migrated_tool_conf.xml')) galaxy_tool_sheds_conf_file = os.environ.get('GALAXY_TEST_TOOL_SHEDS_CONF', os.path.join(tool_shed_test_tmp_dir, 'test_sheds_conf.xml')) - if 'GALAXY_TEST_TOOL_DATA_PATH' in os.environ: - tool_data_path = os.environ.get('GALAXY_TEST_TOOL_DATA_PATH') - else: - tool_data_path = tempfile.mkdtemp(dir=tool_shed_test_tmp_dir) - os.environ['GALAXY_TEST_TOOL_DATA_PATH'] = tool_data_path + tool_data_path = os.environ.get('GALAXY_TEST_TOOL_DATA_PATH', "test/functional/tool-data/") + 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)