From c80b80d3cf96b0137e172e460f63326e34ef8591 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 20 Mar 2019 12:25:14 +0100 Subject: [PATCH] Fix test_workflow_resume_with_mapped_over_input test self.dataset_populator._get_contents_request(history_id=history_id).json() returns the dataset collection as the first element. We do need a HDA here though, so we'd just randomly pick a HDA with the HDCA ID. So if that dataset was deleted by chance the test would fail. Ouch. --- test/api/test_workflows.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/api/test_workflows.py b/test/api/test_workflows.py index 5ab72f3341c..e35e72aba2d 100644 --- a/test/api/test_workflows.py +++ b/test/api/test_workflows.py @@ -791,12 +791,14 @@ test_data: """, history_id=history_id, assert_ok=False, wait=False) self.wait_for_invocation_and_jobs(history_id, job_summary.workflow_id, job_summary.invocation_id, assert_ok=False) history_contents = self.dataset_populator._get_contents_request(history_id=history_id).json() + first_input = history_contents[1] + assert first_input['history_content_type'] == 'dataset' paused_dataset = history_contents[-1] failed_dataset = self.dataset_populator.get_history_dataset_details(history_id, hid=5, assert_ok=False) assert paused_dataset['state'] == 'paused', paused_dataset assert failed_dataset['state'] == 'error', failed_dataset inputs = {"input1": {'values': [{'src': 'hda', - 'id': history_contents[0]['id']}] + 'id': first_input['id']}] }, "failbool": "false", "rerun_remap_job_id": failed_dataset['creating_job']}