projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '11333-cwl-phone-home' closes #11333
[arvados.git]
/
sdk
/
cwl
/
tests
/
test_submit.py
diff --git
a/sdk/cwl/tests/test_submit.py
b/sdk/cwl/tests/test_submit.py
index bbff612a64ce0869b2e85fd1478236593d663209..9982f6ffd5955109904ed2fc726c0d0b35d495ec 100644
(file)
--- a/
sdk/cwl/tests/test_submit.py
+++ b/
sdk/cwl/tests/test_submit.py
@@
-124,7
+124,7
@@
def stubs(func):
'class': 'Directory'
},
'cwl:tool':
'class': 'Directory'
},
'cwl:tool':
- '
4db32e8a15aa48ea084b2f38108f406d+60
/workflow.cwl#main'
+ '
99999999999999999999999999999994+99
/workflow.cwl#main'
},
'repository': 'arvados',
'script_version': 'master',
},
'repository': 'arvados',
'script_version': 'master',
@@
-146,7
+146,7
@@
def stubs(func):
'listing': [
{'basename': 'renamed.txt', 'class': 'File', 'location': 'keep:99999999999999999999999999999998+99/file1.txt'}
]}},
'listing': [
{'basename': 'renamed.txt', 'class': 'File', 'location': 'keep:99999999999999999999999999999998+99/file1.txt'}
]}},
- 'cwl:tool': '
4db32e8a15aa48ea084b2f38108f406d+60
/workflow.cwl#main',
+ 'cwl:tool': '
99999999999999999999999999999994+99
/workflow.cwl#main',
'arv:enable_reuse': True,
'arv:on_error': 'continue'
},
'arv:enable_reuse': True,
'arv:on_error': 'continue'
},
@@
-249,17
+249,17
@@
class TestSubmit(unittest.TestCase):
mock.call(body=JsonDiffMatcher({
'manifest_text':
'. 5bcc9fe8f8d5992e6cf418dc7ce4dbb3+16 0:16:blub.txt\n',
mock.call(body=JsonDiffMatcher({
'manifest_text':
'. 5bcc9fe8f8d5992e6cf418dc7ce4dbb3+16 0:16:blub.txt\n',
- '
owner_uui
d': None,
+ '
replication_desire
d': None,
'name': 'submit_tool.cwl dependencies',
}), ensure_unique_name=True),
'name': 'submit_tool.cwl dependencies',
}), ensure_unique_name=True),
- mock.call().execute(),
+ mock.call().execute(
num_retries=4
),
mock.call(body=JsonDiffMatcher({
'manifest_text':
'. 979af1245a12a1fed634d4222473bfdc+16 0:16:blorp.txt\n',
mock.call(body=JsonDiffMatcher({
'manifest_text':
'. 979af1245a12a1fed634d4222473bfdc+16 0:16:blorp.txt\n',
- '
owner_uui
d': None,
+ '
replication_desire
d': None,
'name': 'submit_wf.cwl input',
}), ensure_unique_name=True),
'name': 'submit_wf.cwl input',
}), ensure_unique_name=True),
- mock.call().execute()])
+ mock.call().execute(
num_retries=4
)])
arvdock.assert_has_calls([
mock.call(stubs.api, {"class": "DockerRequirement", "dockerPull": "debian:8"}, True, None),
arvdock.assert_has_calls([
mock.call(stubs.api, {"class": "DockerRequirement", "dockerPull": "debian:8"}, True, None),
@@
-374,7
+374,7
@@
class TestSubmit(unittest.TestCase):
expect_pipeline["name"] = "hello job 123"
stubs.api.pipeline_instances().create.assert_called_with(
expect_pipeline["name"] = "hello job 123"
stubs.api.pipeline_instances().create.assert_called_with(
- body=
expect_pipeline
)
+ body=
JsonDiffMatcher(expect_pipeline)
)
self.assertEqual(capture_stdout.getvalue(),
stubs.expect_pipeline_uuid + '\n')
self.assertEqual(capture_stdout.getvalue(),
stubs.expect_pipeline_uuid + '\n')
@@
-432,17
+432,17
@@
class TestSubmit(unittest.TestCase):
mock.call(body=JsonDiffMatcher({
'manifest_text':
'. 5bcc9fe8f8d5992e6cf418dc7ce4dbb3+16 0:16:blub.txt\n',
mock.call(body=JsonDiffMatcher({
'manifest_text':
'. 5bcc9fe8f8d5992e6cf418dc7ce4dbb3+16 0:16:blub.txt\n',
- '
owner_uui
d': None,
+ '
replication_desire
d': None,
'name': 'submit_tool.cwl dependencies',
}), ensure_unique_name=True),
'name': 'submit_tool.cwl dependencies',
}), ensure_unique_name=True),
- mock.call().execute(),
+ mock.call().execute(
num_retries=4
),
mock.call(body=JsonDiffMatcher({
'manifest_text':
'. 979af1245a12a1fed634d4222473bfdc+16 0:16:blorp.txt\n',
mock.call(body=JsonDiffMatcher({
'manifest_text':
'. 979af1245a12a1fed634d4222473bfdc+16 0:16:blorp.txt\n',
- '
owner_uui
d': None,
+ '
replication_desire
d': None,
'name': 'submit_wf.cwl input',
}), ensure_unique_name=True),
'name': 'submit_wf.cwl input',
}), ensure_unique_name=True),
- mock.call().execute()])
+ mock.call().execute(
num_retries=4
)])
expect_container = copy.deepcopy(stubs.expect_container_spec)
stubs.api.container_requests().create.assert_called_with(
expect_container = copy.deepcopy(stubs.expect_container_spec)
stubs.api.container_requests().create.assert_called_with(
@@
-1127,7
+1127,7
@@
class TestTemplateInputs(unittest.TestCase):
},
'script_parameters': {
'cwl:tool':
},
'script_parameters': {
'cwl:tool':
- '
00e281847a33e1c0df93161d70a6fc5d+60
/workflow.cwl#main',
+ '
99999999999999999999999999999992+99
/workflow.cwl#main',
'optionalFloatInput': None,
'fileInput': {
'type': 'File',
'optionalFloatInput': None,
'fileInput': {
'type': 'File',
@@
-1188,6
+1188,7
@@
class TestTemplateInputs(unittest.TestCase):
params = expect_template[
"components"]["inputs_test.cwl"]["script_parameters"]
params["fileInput"]["value"] = '99999999999999999999999999999992+99/blorp.txt'
params = expect_template[
"components"]["inputs_test.cwl"]["script_parameters"]
params["fileInput"]["value"] = '99999999999999999999999999999992+99/blorp.txt'
+ params["cwl:tool"] = '99999999999999999999999999999994+99/workflow.cwl#main'
params["floatInput"]["value"] = 1.234
params["boolInput"]["value"] = True
params["floatInput"]["value"] = 1.234
params["boolInput"]["value"] = True