9308: Set task.keepTmpOutput: true when outputDirType is keep_output_dir.
[arvados.git] / sdk / cwl / tests / test_submit.py
index 200f95433b1127535a151726941b9b2179875ab8..eb7199295144368d30da1122e435209e2c6323fa 100644 (file)
@@ -88,6 +88,20 @@ def stubs(func):
                     'location': 'keep:99999999999999999999999999999994+99/blorp.txt',
                     'class': 'File'
                 },
+                'y': {
+                    'basename': '99999999999999999999999999999998+99',
+                    'location': 'keep:99999999999999999999999999999998+99',
+                    'class': 'Directory'
+                },
+                'z': {
+                    'basename': 'anonymous',
+                    "listing": [{
+                        "basename": "renamed.txt",
+                        "class": "File",
+                        "location": "keep:99999999999999999999999999999998+99/file1.txt"
+                    }],
+                    'class': 'Directory'
+                },
                 'cwl:tool':
                 '99999999999999999999999999999991+99/wf/submit_wf.cwl'
             },
@@ -112,7 +126,7 @@ def stubs(func):
                     'kind': 'file'
                 },
                 '/var/lib/cwl/job/cwl.input.json': {
-                    'portable_data_hash': '765fda0d9897729ff467a4609879c00a+60/cwl.input.json',
+                    'portable_data_hash': 'd20d7cddd1984f105dd3702c7f125afb+60/cwl.input.json',
                     'kind': 'collection'
                 }
             },
@@ -155,7 +169,7 @@ class TestSubmit(unittest.TestCase):
                 'manifest_text':
                 './tool d51232d96b6116d964a69bfb7e0c73bf+450 '
                 '0:16:blub.txt 16:434:submit_tool.cwl\n./wf '
-                '4d31c5fefd087faf67ca8db0111af36c+353 0:353:submit_wf.cwl\n',
+                'cc2ffb940e60adf1b2b282c67587e43d+413 0:413:submit_wf.cwl\n',
                 'owner_uuid': 'zzzzz-tpzed-zzzzzzzzzzzzzzz',
                 'name': 'submit_wf.cwl',
             }, ensure_unique_name=True),
@@ -215,7 +229,7 @@ class TestSubmit(unittest.TestCase):
                 'manifest_text':
                 './tool d51232d96b6116d964a69bfb7e0c73bf+450 '
                 '0:16:blub.txt 16:434:submit_tool.cwl\n./wf '
-                '4d31c5fefd087faf67ca8db0111af36c+353 0:353:submit_wf.cwl\n',
+                'cc2ffb940e60adf1b2b282c67587e43d+413 0:413:submit_wf.cwl\n',
                 'owner_uuid': 'zzzzz-tpzed-zzzzzzzzzzzzzzz',
                 'name': 'submit_wf.cwl',
             }, ensure_unique_name=True),
@@ -267,6 +281,17 @@ class TestCreateTemplate(unittest.TestCase):
             'type': 'File',
             'value': '99999999999999999999999999999994+99/blorp.txt',
         }
+        expect_component['script_parameters']['y'] = {
+            'dataclass': 'Collection',
+            'required': True,
+            'type': 'Directory',
+            'value': '99999999999999999999999999999998+99',
+        }
+        expect_component['script_parameters']['z'] = {
+            'dataclass': 'Collection',
+            'required': True,
+            'type': 'Directory',
+        }
         expect_template = {
             "components": {
                 "submit_wf.cwl": expect_component,