From fbaa58ace7a2c626bce8c9a682eecb1e45377fad Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 18 Apr 2019 13:24:18 -0400 Subject: [PATCH] Run API tests with a nested object store. --- run_tests.sh | 2 ++ test/base/driver_util.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/run_tests.sh b/run_tests.sh index 5634c1d7793..0efac9e7111 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -362,6 +362,8 @@ do fi ;; -a|-api|--api) + GALAXY_TEST_USE_HIERARCHICAL_OBJECT_STORE="True" # Run these tests with a non-trivial object store. + export GALAXY_TEST_USE_HIERARCHICAL_OBJECT_STORE GALAXY_TEST_TOOL_CONF="config/tool_conf.xml.sample,test/functional/tools/samples_tool_conf.xml" test_script="pytest" report_file="./run_api_tests.html" diff --git a/test/base/driver_util.py b/test/base/driver_util.py index 7b09c9b91eb..c828c848389 100644 --- a/test/base/driver_util.py +++ b/test/base/driver_util.py @@ -240,6 +240,36 @@ def setup_galaxy_config( ) config.update(database_conf(tmpdir, prefer_template_database=prefer_template_database)) config.update(install_database_conf(tmpdir, default_merged=default_install_db_merged)) + if asbool(os.environ.get("GALAXY_TEST_USE_HIERARCHICAL_OBJECT_STORE")): + object_store_config = os.path.join(tmpdir, "object_store_conf.yml") + with open(object_store_config, "w") as f: + contents = """ +type: hierarchical +backends: + - id: files1 + type: disk + weight: 1 + files_dir: "${temp_directory}/files1" + extra_dirs: + - type: temp + path: "${temp_directory}/tmp1" + - type: job_work + path: "${temp_directory}/job_working_directory1" + - id: files2 + type: disk + weight: 1 + files_dir: "${temp_directory}/files2" + extra_dirs: + - type: temp + path: "${temp_directory}/tmp2" + - type: job_work + path: "${temp_directory}/job_working_directory2" +""" + contents_template = string.Template(contents) + expanded_contents = contents_template.safe_substitute(temp_directory=tmpdir) + f.write(expanded_contents) + config["object_store_config_file"] = object_store_config + if datatypes_conf is not None: config['datatypes_config_file'] = datatypes_conf if enable_tool_shed_check: