From: Peter Amstutz Date: Tue, 3 May 2022 22:05:43 +0000 (-0400) Subject: 19070: Fix most tests X-Git-Tag: 2.5.0~179^2~7 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/2b0fad4e2c099ebe42ae7cdb20615d9e0da2afc9 19070: Fix most tests Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py index 6b670c73df..10323c2be7 100644 --- a/sdk/cwl/arvados_cwl/runner.py +++ b/sdk/cwl/arvados_cwl/runner.py @@ -402,7 +402,8 @@ def upload_dependencies(arvrunner, name, document_loader, keeprefs = set() def addkeepref(k): - keeprefs.add(collection_pdh_pattern.match(k).group(1)) + if k.startswith("keep:"): + keeprefs.add(collection_pdh_pattern.match(k).group(1)) def setloc(p): loc = p.get("location") diff --git a/sdk/cwl/tests/test_submit.py b/sdk/cwl/tests/test_submit.py index 5092fc4575..b43f0268a2 100644 --- a/sdk/cwl/tests/test_submit.py +++ b/sdk/cwl/tests/test_submit.py @@ -77,7 +77,7 @@ def stubs(func): "arvados/jobs:123": [("zzzzz-4zz18-zzzzzzzzzzzzzd5", {})], "arvados/jobs:latest": [("zzzzz-4zz18-zzzzzzzzzzzzzd6", {})], } - def kd(a, b, image_name=None, image_tag=None): + def kd(a, b, image_name=None, image_tag=None, project_uuid=None): return stubs.docker_images.get("%s:%s" % (image_name, image_tag), []) stubs.keepdocker.side_effect = kd @@ -1599,6 +1599,9 @@ class TestCreateWorkflow(unittest.TestCase): @stubs def test_update(self, stubs): + project_uuid = 'zzzzz-j7d0g-zzzzzzzzzzzzzzz' + stubs.api.workflows().get().execute.return_value = {"owner_uuid": project_uuid} + exited = arvados_cwl.main( ["--update-workflow", self.existing_workflow_uuid, "--debug", @@ -1610,6 +1613,7 @@ class TestCreateWorkflow(unittest.TestCase): "name": "submit_wf.cwl", "description": "", "definition": self.expect_workflow, + "owner_uuid": project_uuid } } stubs.api.workflows().update.assert_called_with( @@ -1622,6 +1626,9 @@ class TestCreateWorkflow(unittest.TestCase): @stubs def test_update_name(self, stubs): + project_uuid = 'zzzzz-j7d0g-zzzzzzzzzzzzzzz' + stubs.api.workflows().get().execute.return_value = {"owner_uuid": project_uuid} + exited = arvados_cwl.main( ["--update-workflow", self.existing_workflow_uuid, "--debug", "--name", "testing 123", @@ -1633,6 +1640,7 @@ class TestCreateWorkflow(unittest.TestCase): "name": "testing 123", "description": "", "definition": self.expect_workflow, + "owner_uuid": project_uuid } } stubs.api.workflows().update.assert_called_with(