From e49a01cb75572deacf6878ad53d7965ea1869d2b Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Sun, 13 Nov 2022 18:19:53 -0500 Subject: [PATCH] 19688: Fix tests Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- .../collection_per_tool_wrapper.cwl | 3 +- sdk/cwl/tests/test_submit.py | 6 +- sdk/cwl/tests/wf/expect_upload_wrapper.cwl | 3 +- .../wf/expect_upload_wrapper_altname.cwl | 89 +++++++++++++++++++ 4 files changed, 97 insertions(+), 4 deletions(-) create mode 100644 sdk/cwl/tests/wf/expect_upload_wrapper_altname.cwl diff --git a/sdk/cwl/tests/collection_per_tool/collection_per_tool_wrapper.cwl b/sdk/cwl/tests/collection_per_tool/collection_per_tool_wrapper.cwl index 12302f13f7..fda566c880 100644 --- a/sdk/cwl/tests/collection_per_tool/collection_per_tool_wrapper.cwl +++ b/sdk/cwl/tests/collection_per_tool/collection_per_tool_wrapper.cwl @@ -22,8 +22,9 @@ ], "steps": [ { - "id": "#main/step", + "id": "#main/collection_per_tool.cwl", "in": [], + "label": "collection_per_tool.cwl", "out": [], "run": "keep:92045991f69a417f2f26660db67911ef+61/workflow.json#main" } diff --git a/sdk/cwl/tests/test_submit.py b/sdk/cwl/tests/test_submit.py index 55b66adccb..17c09f1ee7 100644 --- a/sdk/cwl/tests/test_submit.py +++ b/sdk/cwl/tests/test_submit.py @@ -1592,6 +1592,8 @@ class TestCreateWorkflow(unittest.TestCase): existing_workflow_uuid = "zzzzz-7fd4e-validworkfloyml" expect_workflow = StripYAMLComments( open("tests/wf/expect_upload_wrapper.cwl").read().rstrip()) + expect_workflow_altname = StripYAMLComments( + open("tests/wf/expect_upload_wrapper_altname.cwl").read().rstrip()) def setUp(self): cwltool.process._names = set() @@ -1657,7 +1659,7 @@ class TestCreateWorkflow(unittest.TestCase): "owner_uuid": project_uuid, "name": "testing 123", "description": "", - "definition": self.expect_workflow, + "definition": self.expect_workflow_altname, } } stubs.api.workflows().create.assert_called_with( @@ -1712,7 +1714,7 @@ class TestCreateWorkflow(unittest.TestCase): "workflow": { "name": "testing 123", "description": "", - "definition": self.expect_workflow, + "definition": self.expect_workflow_altname, "owner_uuid": project_uuid } } diff --git a/sdk/cwl/tests/wf/expect_upload_wrapper.cwl b/sdk/cwl/tests/wf/expect_upload_wrapper.cwl index 78827cbc5d..3821527bb2 100644 --- a/sdk/cwl/tests/wf/expect_upload_wrapper.cwl +++ b/sdk/cwl/tests/wf/expect_upload_wrapper.cwl @@ -63,7 +63,7 @@ ], "steps": [ { - "id": "#main/step", + "id": "#main/submit_wf.cwl", "in": [ { "id": "#main/step/x", @@ -78,6 +78,7 @@ "source": "#main/z" } ], + "label": "submit_wf.cwl", "out": [], "run": "keep:f1c2b0c514a5fb9b2a8b5b38a31bab66+61/workflow.json#main" } diff --git a/sdk/cwl/tests/wf/expect_upload_wrapper_altname.cwl b/sdk/cwl/tests/wf/expect_upload_wrapper_altname.cwl new file mode 100644 index 0000000000..c37a28cc48 --- /dev/null +++ b/sdk/cwl/tests/wf/expect_upload_wrapper_altname.cwl @@ -0,0 +1,89 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + +{ + "$graph": [ + { + "class": "Workflow", + "hints": [ + { + "acrContainerImage": "999999999999999999999999999999d3+99", + "class": "http://arvados.org/cwl#WorkflowRunnerResources" + } + ], + "id": "#main", + "inputs": [ + { + "default": { + "basename": "blorp.txt", + "class": "File", + "location": "keep:169f39d466a5438ac4a90e779bf750c7+53/blorp.txt", + "nameext": ".txt", + "nameroot": "blorp", + "size": 16 + }, + "id": "#main/x", + "type": "File" + }, + { + "default": { + "basename": "99999999999999999999999999999998+99", + "class": "Directory", + "location": "keep:99999999999999999999999999999998+99" + }, + "id": "#main/y", + "type": "Directory" + }, + { + "default": { + "basename": "anonymous", + "class": "Directory", + "listing": [ + { + "basename": "renamed.txt", + "class": "File", + "location": "keep:99999999999999999999999999999998+99/file1.txt", + "nameext": ".txt", + "nameroot": "renamed", + "size": 0 + } + ], + "location": "_:df80736f-f14d-4b10-b2e3-03aa27f034b2" + }, + "id": "#main/z", + "type": "Directory" + } + ], + "outputs": [], + "requirements": [ + { + "class": "SubworkflowFeatureRequirement" + } + ], + "steps": [ + { + "id": "#main/testing 123", + "in": [ + { + "id": "#main/step/x", + "source": "#main/x" + }, + { + "id": "#main/step/y", + "source": "#main/y" + }, + { + "id": "#main/step/z", + "source": "#main/z" + } + ], + "label": "testing 123", + "out": [], + "run": "keep:f1c2b0c514a5fb9b2a8b5b38a31bab66+61/workflow.json#main" + } + ] + } + ], + "cwlVersion": "v1.2" +} -- 2.30.2