Files
galaxy/test/integration/test_work_queue_put_failure.py
T
Nicola Soranzo 9d74bba7fb Drop support for retired Python 3.5
Upgrade syntax using `pyupgrade --py36-plus` .

Manually drop several `six` imports.

Also:
- Remove broken pr_cache in scripts/bootstrap_history.py
- Fix broken prefix removal in lib/galaxy/tool_util/deps/mulled/mulled_build.py
2020-10-07 11:52:13 +01:00

42 lines
1.3 KiB
Python

import tempfile
from galaxy_test.base.populators import DatasetPopulator
from galaxy_test.driver import integration_util
job_conf_yaml = """
runners:
local:
load: galaxy.jobs.runners.pulsar:PulsarRESTJobRunner
workers: 1
execution:
default: local
environments:
local:
runner: local
"""
class WorkQueuePutFailureTestCase(integration_util.IntegrationTestCase):
def setUp(self):
super().setUp()
self.dataset_populator = DatasetPopulator(self.galaxy_interactor)
self.history_id = self.dataset_populator.new_history()
@classmethod
def handle_galaxy_config_kwds(cls, config, ):
# config["jobs_directory"] = cls.jobs_directory
fd, path = tempfile.mkstemp(suffix='job_conf.yml')
with open(path, 'w') as job_conf:
job_conf.write(job_conf_yaml)
config["job_config_file"] = path
# Disable tool dependency resolution.
config["tool_dependency_dir"] = "none"
def test_job_fails(self):
self.dataset_populator.new_dataset(self.history_id, content="1 2 3")
self.dataset_populator.wait_for_history(self.history_id, assert_ok=False)
state_details = self.galaxy_interactor.get('histories/%s' % self.history_id).json()['state_details']
assert state_details['running'] == 0
assert state_details['error'] == 1