-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import os | ||
import subprocess | ||
|
||
from galaxy_test.base.populators import DatasetPopulator | ||
from galaxy_test.driver import integration_util | ||
from galaxy_test.driver.driver_util import galaxy_root | ||
from .test_containerized_jobs import ( | ||
disable_dependency_resolution, | ||
skip_if_container_type_unavailable, | ||
) | ||
|
||
DOCKERIZED_JOB_CONFIG = { | ||
"runners": {"local": {"load": "galaxy.jobs.runners.local:LocalJobRunner", "workers": 1}}, | ||
"execution": { | ||
"default": "local_docker", | ||
"environments": { | ||
"local_docker": { | ||
"runner": "local", | ||
"docker_enabled": True, | ||
"metadata_config": { | ||
"containerize": True, | ||
"engine": "docker", | ||
"image": "galaxyproject/galaxy-job-execution", | ||
}, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
|
||
class ContainerizedMetadataIntegrationTestCase(integration_util.IntegrationTestCase): | ||
dataset_populator: DatasetPopulator | ||
framework_tool_and_types = True | ||
container_type = "docker" | ||
|
||
@classmethod | ||
def handle_galaxy_config_kwds(cls, config) -> None: | ||
super().handle_galaxy_config_kwds(config) | ||
config["job_config"] = DOCKERIZED_JOB_CONFIG | ||
config["enable_celery_tasks"] = False | ||
config["metadata_strategy"] = "extended" | ||
disable_dependency_resolution(config) | ||
|
||
def setUp(self) -> None: | ||
super().setUp() | ||
self.dataset_populator = DatasetPopulator(self.galaxy_interactor) | ||
|
||
@classmethod | ||
def setUpClass(cls) -> None: | ||
skip_if_container_type_unavailable(cls) | ||
subprocess.check_output( | ||
[ | ||
"docker", | ||
"build", | ||
"-t", | ||
"galaxyproject/galaxy-job-execution", | ||
"-f", | ||
os.path.join(galaxy_root, "packages", "job_execution", "Dockerfile"), | ||
galaxy_root, | ||
] | ||
) | ||
super().setUpClass() | ||
|
||
|
||
instance = integration_util.integration_module_instance(ContainerizedMetadataIntegrationTestCase) | ||
|
||
test_tools = integration_util.integration_tool_runner( | ||
[ | ||
"metadata_bam", | ||
] | ||
) |