mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Run API tests with a nested object store.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user