X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b8de9b3e62e82b806576b237be5f317bf378169f..04a8e2c7d8a8dd3afd891292415cdfaea25fd481:/sdk/cwl/tests/test_submit.py diff --git a/sdk/cwl/tests/test_submit.py b/sdk/cwl/tests/test_submit.py index eaddca0acd..bbff612a64 100644 --- 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': - 'f57578d5cfda7f70fef00cbc4b621e6b+58/workflow.cwl#main' + '4db32e8a15aa48ea084b2f38108f406d+60/workflow.cwl#main' }, 'repository': 'arvados', 'script_version': 'master', @@ -146,7 +146,7 @@ def stubs(func): 'listing': [ {'basename': 'renamed.txt', 'class': 'File', 'location': 'keep:99999999999999999999999999999998+99/file1.txt'} ]}}, - 'cwl:tool': 'f57578d5cfda7f70fef00cbc4b621e6b+58/workflow.cwl#main', + 'cwl:tool': '4db32e8a15aa48ea084b2f38108f406d+60/workflow.cwl#main', 'arv:enable_reuse': True, 'arv:on_error': 'continue' }, @@ -233,9 +233,10 @@ def stubs(func): class TestSubmit(unittest.TestCase): + @mock.patch("arvados_cwl.runner.arv_docker_get_image") @mock.patch("time.sleep") @stubs - def test_submit(self, stubs, tm): + def test_submit(self, stubs, tm, arvdock): capture_stdout = cStringIO.StringIO() exited = arvados_cwl.main( ["--submit", "--no-wait", "--api=jobs", "--debug", @@ -260,6 +261,11 @@ class TestSubmit(unittest.TestCase): }), ensure_unique_name=True), mock.call().execute()]) + arvdock.assert_has_calls([ + mock.call(stubs.api, {"class": "DockerRequirement", "dockerPull": "debian:8"}, True, None), + mock.call(stubs.api, {'dockerPull': 'arvados/jobs:'+arvados_cwl.__version__}, True, None) + ]) + expect_pipeline = copy.deepcopy(stubs.expect_pipeline_instance) stubs.api.pipeline_instances().create.assert_called_with( body=JsonDiffMatcher(expect_pipeline)) @@ -1121,7 +1127,7 @@ class TestTemplateInputs(unittest.TestCase): }, 'script_parameters': { 'cwl:tool': - '5800682d508698dc9ce6d2fc618f21d8+58/workflow.cwl#main', + '00e281847a33e1c0df93161d70a6fc5d+60/workflow.cwl#main', 'optionalFloatInput': None, 'fileInput': { 'type': 'File',