12347: Fix --disable-reuse for containers API.
[arvados.git] / sdk / cwl / tests / test_submit.py
index 49545a83dc7ac34eea9acc11dc3e022f2839f22c..d7ec1acbf8ab543f86e1e80477801381ce6f083f 100644 (file)
@@ -157,8 +157,6 @@ def stubs(func):
                             'basename': 'blorp.txt',
                             'class': 'File',
                             'location': 'keep:169f39d466a5438ac4a90e779bf750c7+53/blorp.txt',
-                            "nameext": ".txt",
-                            "nameroot": "blorp",
                             "size": 16
                         }},
                         'z': {"value": {'basename': 'anonymous', 'class': 'Directory',
@@ -166,9 +164,7 @@ def stubs(func):
                                   {
                                       'basename': 'renamed.txt',
                                       'class': 'File', 'location':
-                                      'keep:99999999999999999999999999999998+99/file1.txt',
-                                      "nameext": ".txt",
-                                      "nameroot": "renamed"
+                                      'keep:99999999999999999999999999999998+99/file1.txt'
                                   }
                               ]}},
                         'cwl:tool': '3fffdeaa75e018172e1b583425f4ebff+60/workflow.cwl#main',
@@ -223,16 +219,12 @@ def stubs(func):
                             'basename': u'blorp.txt',
                             'class': 'File',
                             'location': u'keep:169f39d466a5438ac4a90e779bf750c7+53/blorp.txt',
-                            "nameext": ".txt",
-                            "nameroot": "blorp",
                             "size": 16
                         },
                         'z': {'basename': 'anonymous', 'class': 'Directory', 'listing': [
                             {'basename': 'renamed.txt',
                              'class': 'File',
-                             'location': 'keep:99999999999999999999999999999998+99/file1.txt',
-                             "nameext": ".txt",
-                             "nameroot": "renamed"
+                             'location': 'keep:99999999999999999999999999999998+99/file1.txt'
                             }
                         ]}
                     },
@@ -253,7 +245,8 @@ def stubs(func):
                 'vcpus': 1,
                 'ram': 1024*1024*1024
             },
-            "properties": {}
+            'use_existing': True,
+            'properties': {}
         }
 
         stubs.expect_workflow_uuid = "zzzzz-7fd4e-zzzzzzzzzzzzzzz"
@@ -506,6 +499,7 @@ class TestSubmit(unittest.TestCase):
         expect_container["command"] = ['arvados-cwl-runner', '--local', '--api=containers', '--no-log-timestamps',
                                                   '--disable-reuse', '--on-error=continue',
                                                   '/var/lib/cwl/workflow.json#main', '/var/lib/cwl/cwl.input.json']
+        expect_container["use_existing"] = False
 
         stubs.api.container_requests().create.assert_called_with(
             body=JsonDiffMatcher(expect_container))
@@ -713,7 +707,8 @@ class TestSubmit(unittest.TestCase):
                 'vcpus': 1,
                 'ram': 1073741824
             },
-            "properties": {}
+            'use_existing': True,
+            'properties': {}
         }
 
         stubs.api.container_requests().create.assert_called_with(
@@ -828,7 +823,8 @@ class TestSubmit(unittest.TestCase):
                 'vcpus': 1,
                 'ram': 1073741824
             },
-            "properties": {
+            'use_existing': True,
+            'properties': {
                 "template_uuid": "962eh-7fd4e-gkbzl62qqtfig37"
             }
         }