[ARVADOS] updated: 08cc91f0493dd8dfe27046faf02c2c907e50443e

Git user git at public.curoverse.com
Thu May 19 15:48:54 EDT 2016


Summary of changes:
 sdk/cwl/arvados_cwl/__init__.py |  2 +-
 sdk/cwl/setup.py                |  2 +-
 sdk/cwl/tests/test_job.py       | 11 +++++++----
 sdk/cwl/tests/test_submit.py    | 12 ++++++------
 4 files changed, 15 insertions(+), 12 deletions(-)

       via  08cc91f0493dd8dfe27046faf02c2c907e50443e (commit)
      from  3c8c81609c8e9b3b422477002e8a348aabafb3b9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 08cc91f0493dd8dfe27046faf02c2c907e50443e
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu May 19 15:48:46 2016 -0400

    8653: Fix tests.

diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index 20192bf..1740a90 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -807,7 +807,7 @@ def main(args, stdout, stderr, api_client=None):
 
     job_order_object = None
     arvargs = parser.parse_args(args)
-    if arvargs.create_template:
+    if arvargs.create_template and not arvargs.job_order:
         job_order_object = ({}, "")
 
     try:
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index c069843..5191e5b 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -30,7 +30,7 @@ setup(name='arvados-cwl-runner',
           'bin/arvados-cwl-runner'
       ],
       install_requires=[
-          'cwltool==1.0.20160518201549',
+          'cwltool==1.0.20160519182434',
           'arvados-python-client>=0.1.20160322001610'
       ],
       test_suite='tests',
diff --git a/sdk/cwl/tests/test_job.py b/sdk/cwl/tests/test_job.py
index e74e000..dba65b0 100644
--- a/sdk/cwl/tests/test_job.py
+++ b/sdk/cwl/tests/test_job.py
@@ -3,6 +3,7 @@ import logging
 import mock
 import unittest
 import os
+import cwltool.process
 
 if not os.getenv('ARVADOS_DEBUG'):
     logging.getLogger('arvados.cwl-runner').setLevel(logging.WARN)
@@ -17,15 +18,16 @@ class TestJob(unittest.TestCase):
         runner = mock.MagicMock()
         runner.project_uuid = "zzzzz-8i9sb-zzzzzzzzzzzzzzz"
         runner.ignore_docker_for_reuse = False
+        document_loader, avsc_names, schema_metadata, metaschema_loader = cwltool.process.get_schema("draft-3")
 
         tool = {
             "inputs": [],
             "outputs": [],
             "baseCommand": "ls"
         }
-        arvtool = arvados_cwl.ArvadosCommandTool(runner, tool)
+        arvtool = arvados_cwl.ArvadosCommandTool(runner, tool, avsc_names=avsc_names, basedir="")
         arvtool.formatgraph = None
-        for j in arvtool.job({}, "", mock.MagicMock()):
+        for j in arvtool.job({}, mock.MagicMock(), basedir=""):
             j.run()
             runner.api.jobs().create.assert_called_with(
                 body={
@@ -61,6 +63,7 @@ class TestJob(unittest.TestCase):
         runner = mock.MagicMock()
         runner.project_uuid = "zzzzz-8i9sb-zzzzzzzzzzzzzzz"
         runner.ignore_docker_for_reuse = False
+        document_loader, avsc_names, schema_metadata, metaschema_loader = cwltool.process.get_schema("draft-3")
 
         tool = {
             "inputs": [],
@@ -73,9 +76,9 @@ class TestJob(unittest.TestCase):
             }],
             "baseCommand": "ls"
         }
-        arvtool = arvados_cwl.ArvadosCommandTool(runner, tool)
+        arvtool = arvados_cwl.ArvadosCommandTool(runner, tool, avsc_names=avsc_names)
         arvtool.formatgraph = None
-        for j in arvtool.job({}, "", mock.MagicMock()):
+        for j in arvtool.job({}, mock.MagicMock(), basedir=""):
             j.run()
         runner.api.jobs().create.assert_called_with(
             body={
diff --git a/sdk/cwl/tests/test_submit.py b/sdk/cwl/tests/test_submit.py
index 432aba2..38741eb 100644
--- a/sdk/cwl/tests/test_submit.py
+++ b/sdk/cwl/tests/test_submit.py
@@ -88,9 +88,9 @@ class TestSubmit(unittest.TestCase):
             mock.call(),
             mock.call(body={
                 'manifest_text':
-                './tool 84ec4df683711de31b782505389a8843+429 '
-                '0:16:blub.txt 16:413:submit_tool.cwl\n./wf '
-                '81d977a245a41b8e79859fbe00623fd0+344 0:344:submit_wf.cwl\n',
+                './tool a3954c369b8924d40547ec8cf5f6a7f4+449 '
+                '0:16:blub.txt 16:433:submit_tool.cwl\n./wf '
+                'e046cace0b1a0a6ee645f6ea8688f7e2+364 0:364:submit_wf.cwl\n',
                 'owner_uuid': 'zzzzz-tpzed-zzzzzzzzzzzzzzz',
                 'name': 'submit_wf.cwl',
             }, ensure_unique_name=True),
@@ -161,7 +161,7 @@ class TestCreateTemplate(unittest.TestCase):
             "owner_uuid": project_uuid,
         }
         stubs.api.pipeline_templates().create.assert_called_with(
-            body=JsonDiffMatcher(expect_template))
+            body=JsonDiffMatcher(expect_template), ensure_unique_name=True)
 
         self.assertEqual(capture_stdout.getvalue(),
                          stubs.expect_pipeline_template_uuid + '\n')
@@ -226,7 +226,7 @@ class TestTemplateInputs(unittest.TestCase):
         expect_template["owner_uuid"] = stubs.fake_user_uuid
 
         stubs.api.pipeline_templates().create.assert_called_with(
-            body=JsonDiffMatcher(expect_template))
+            body=JsonDiffMatcher(expect_template), ensure_unique_name=True)
 
     @stubs
     def test_inputs(self, stubs):
@@ -247,4 +247,4 @@ class TestTemplateInputs(unittest.TestCase):
         params["boolInput"]["value"] = True
 
         stubs.api.pipeline_templates().create.assert_called_with(
-            body=JsonDiffMatcher(expect_template))
+            body=JsonDiffMatcher(expect_template), ensure_unique_name=True)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list