Skip to content

Commit

Permalink
Test rename PJA when resuming a failed job
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Mar 13, 2018
1 parent b685b53 commit f1dd060
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions test/api/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2142,6 +2142,55 @@ def test_run_rename_based_on_input(self):
name = content["name"]
assert name == "fasta1 suffix", name

@skip_without_tool("fail_identifier")
@skip_without_tool("cat")
def test_run_rename_when_resuming_jobs(self):
with self.dataset_populator.test_history() as history_id:
self._run_jobs("""
class: GalaxyWorkflow
inputs:
- id: input1
steps:
- tool_id: fail_identifier
label: first_fail
state:
failbool: true
input1:
$link: input1
outputs:
out_file1:
rename: "cat1 out"
- tool_id: cat
state:
input1:
$link: first_fail#out_file1
outputs:
out_file1:
rename: "#{input1} suffix"
test_data:
input1:
value: 1.fasta
type: File
name: fail
""", history_id=history_id, wait=True, assert_ok=False)
content = self.dataset_populator.get_history_dataset_details(history_id, hid=2, wait=True, assert_ok=False)
name = content["name"]
assert content['state'] == 'error', content
input1 = self.dataset_populator.get_history_dataset_details(history_id, hid=1, wait=True, assert_ok=False)
job_id = content['creating_job']
inputs = {"input1": {'values': [{'src': 'hda',
'id': input1['id']}]
},
"failbool": "false",
"rerun_remap_job_id": job_id}
self.dataset_populator.run_tool(tool_id='fail_identifier',
inputs=inputs,
history_id=history_id,
assert_ok=True)
unpaused_dataset = self.dataset_populator.get_history_dataset_details(history_id, wait=True, assert_ok=False)
assert unpaused_dataset['state'] == 'ok'
assert unpaused_dataset['name'] == "%s suffix" % name

@skip_without_tool("cat")
def test_run_rename_based_on_input_recursive(self):
history_id = self.dataset_populator.new_history()
Expand Down

0 comments on commit f1dd060

Please sign in to comment.