Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
arash77 committed Jun 28, 2024
1 parent 851f9c8 commit 9592520
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/galaxy_test/api/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -7613,6 +7613,13 @@ def _all_user_invocation_ids(self):
invocation_ids = [i["id"] for i in all_invocations_for_user.json()]
return invocation_ids

def test_subworkflow_tags(self):
workflow = self.workflow_populator.load_workflow_from_resource("test_subworkflow_with_tags")
workflow_id = self.workflow_populator.create_workflow(workflow)
downloaded_workflow = self._download_workflow(workflow_id)
subworkflow = downloaded_workflow["steps"]["1"]["subworkflow"]
assert subworkflow["tags"] == []


class TestAdminWorkflowsApi(BaseWorkflowsApiTestCase):
require_admin_user = True
Expand Down
134 changes: 134 additions & 0 deletions lib/galaxy_test/base/data/test_subworkflow_with_tags.ga
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"a_galaxy_workflow": "true",
"annotation": "Test main ",
"comments": [],
"format-version": "0.1",
"name": "Unnamed Workflow",
"report": {
"markdown": "\n# Workflow Execution Report\n\n## Workflow Inputs\n```galaxy\ninvocation_inputs()\n```\n\n## Workflow Outputs\n```galaxy\ninvocation_outputs()\n```\n\n## Workflow\n```galaxy\nworkflow_display()\n```\n"
},
"steps": {
"0": {
"annotation": "",
"content_id": null,
"errors": null,
"id": 0,
"input_connections": {},
"inputs": [],
"label": null,
"name": "Input dataset",
"outputs": [],
"position": {
"left": 0,
"top": 0
},
"tool_id": null,
"tool_state": "{\"optional\": false, \"tag\": null}",
"tool_version": null,
"type": "data_input",
"uuid": "967583e9-d2a6-444a-ba31-6fb749d03f9e",
"when": null,
"workflow_outputs": []
},
"1": {
"annotation": "",
"id": 1,
"input_connections": {
"0:Input dataset": {
"id": 0,
"input_subworkflow_step_id": 0,
"output_name": "output"
}
},
"inputs": [],
"label": null,
"name": "Workflow with tags",
"outputs": [],
"position": {
"left": 249,
"top": 51
},
"subworkflow": {
"a_galaxy_workflow": "true",
"annotation": "",
"comments": [],
"format-version": "0.1",
"name": "Workflow with tags",
"report": {
"markdown": "\n# Workflow Execution Report\n\n## Workflow Inputs\n```galaxy\ninvocation_inputs()\n```\n\n## Workflow Outputs\n```galaxy\ninvocation_outputs()\n```\n\n## Workflow\n```galaxy\nworkflow_display()\n```\n"
},
"steps": {
"0": {
"annotation": "",
"content_id": null,
"errors": null,
"id": 0,
"input_connections": {},
"inputs": [],
"label": null,
"name": "Input dataset",
"outputs": [],
"position": {
"left": 0,
"top": 0.0
},
"tool_id": null,
"tool_state": "{\"optional\": false, \"tag\": null}",
"tool_version": null,
"type": "data_input",
"uuid": "eca9b088-ff50-4253-8387-01512f03ff2f",
"when": null,
"workflow_outputs": []
},
"1": {
"annotation": "",
"content_id": "addValue",
"errors": null,
"id": 1,
"input_connections": {
"input": {
"id": 0,
"output_name": "output"
}
},
"inputs": [
{
"description": "runtime parameter for tool Add column",
"name": "input"
}
],
"label": null,
"name": "Add column",
"outputs": [
{
"name": "out_file1",
"type": "input"
}
],
"position": {
"left": 123,
"top": 112.0
},
"post_job_actions": {},
"tool_id": "addValue",
"tool_state": "{\"exp\": \"1\", \"input\": {\"__class__\": \"RuntimeValue\"}, \"iterate\": \"no\", \"__page__\": null, \"__rerun_remap_job_id__\": null}",
"tool_version": "1.0.0",
"type": "tool",
"uuid": "7016e754-149b-402a-bb17-eb6cd4b1ab0a",
"when": null,
"workflow_outputs": []
}
},
"uuid": "c33370a9-188f-4af8-bfcc-137c577c79ba"
},
"tool_id": null,
"type": "subworkflow",
"uuid": "90bdcd13-418a-49da-847e-02926942bf4b",
"when": null,
"workflow_outputs": []
}
},
"tags": [],
"uuid": "64d7fac3-6402-412b-9db6-490ffc18e129",
"version": 1
}

0 comments on commit 9592520

Please sign in to comment.