19688: Fix tests
authorPeter Amstutz <peter.amstutz@curii.com>
Sun, 13 Nov 2022 23:19:53 +0000 (18:19 -0500)
committerPeter Amstutz <peter.amstutz@curii.com>
Sun, 13 Nov 2022 23:19:53 +0000 (18:19 -0500)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

sdk/cwl/tests/collection_per_tool/collection_per_tool_wrapper.cwl
sdk/cwl/tests/test_submit.py
sdk/cwl/tests/wf/expect_upload_wrapper.cwl
sdk/cwl/tests/wf/expect_upload_wrapper_altname.cwl [new file with mode: 0644]

index 12302f13f744a7a36dcb7ee40b76847620165cb9..fda566c88016b4962ebada51c910ed95d8747bda 100644 (file)
@@ -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"
                 }
index 55b66adccb7cea7f28b3a82d559b1f50d6094690..17c09f1ee78db4c5a1b45b1d71769f33d71fd8d7 100644 (file)
@@ -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
             }
         }
index 78827cbc5dc16b1228cd8088348f3eb8b4c9bdd7..3821527bb2565b979668dc7be8b1e1113e1d9c93 100644 (file)
@@ -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 (file)
index 0000000..c37a28c
--- /dev/null
@@ -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"
+}