X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b5d352d6099b60db5dcdd9183dcab3e8e17d729e..47eb67e4c084abde49d5463d4ced8b4436a59dfd:/sdk/cwl/tests/test_container.py diff --git a/sdk/cwl/tests/test_container.py b/sdk/cwl/tests/test_container.py index aab963dcb2..c20693469a 100644 --- a/sdk/cwl/tests/test_container.py +++ b/sdk/cwl/tests/test_container.py @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + import arvados_cwl from arvados_cwl.arvdocker import arv_docker_clear_cache import logging @@ -40,7 +44,8 @@ class TestContainer(unittest.TestCase): "inputs": [], "outputs": [], "baseCommand": "ls", - "arguments": [{"valueFrom": "$(runtime.outdir)"}] + "arguments": [{"valueFrom": "$(runtime.outdir)"}], + "id": "#" }) make_fs_access=functools.partial(arvados_cwl.CollectionFsAccess, collection_cache=arvados_cwl.CollectionCache(runner.api, None, 0)) @@ -116,8 +121,12 @@ class TestContainer(unittest.TestCase): }, { "class": "http://arvados.org/cwl#IntermediateOutput", "outputTTL": 7200 + }, { + "class": "http://arvados.org/cwl#ReuseRequirement", + "enableReuse": False }], - "baseCommand": "ls" + "baseCommand": "ls", + "id": "#" }) make_fs_access=functools.partial(arvados_cwl.CollectionFsAccess, collection_cache=arvados_cwl.CollectionCache(runner.api, None, 0)) @@ -127,7 +136,7 @@ class TestContainer(unittest.TestCase): arvtool.formatgraph = None for j in arvtool.job({}, mock.MagicMock(), basedir="", name="test_resource_requirements", make_fs_access=make_fs_access, tmpdir="/tmp"): - j.run() + j.run(enable_reuse=True) call_args, call_kwargs = runner.api.container_requests().create.call_args @@ -143,7 +152,7 @@ class TestContainer(unittest.TestCase): 'keep_cache_ram': 536870912, 'API': True }, - 'use_existing': True, + 'use_existing': False, 'priority': 1, 'mounts': { '/tmp': {'kind': 'tmp', @@ -224,7 +233,8 @@ class TestContainer(unittest.TestCase): "location": "keep:99999999999999999999999999999995+99/subdir" } ] }], - "baseCommand": "ls" + "baseCommand": "ls", + "id": "#" }) make_fs_access=functools.partial(arvados_cwl.CollectionFsAccess, collection_cache=arvados_cwl.CollectionCache(runner.api, None, 0)) @@ -322,7 +332,8 @@ class TestContainer(unittest.TestCase): "stdout": "stdout.txt", "stderr": "stderr.txt", "stdin": "/keep/99999999999999999999999999999996+99/file.txt", - "arguments": [{"valueFrom": "$(runtime.outdir)"}] + "arguments": [{"valueFrom": "$(runtime.outdir)"}], + "id": "#" }) make_fs_access=functools.partial(arvados_cwl.CollectionFsAccess, collection_cache=arvados_cwl.CollectionCache(runner.api, None, 0)) @@ -442,7 +453,8 @@ class TestContainer(unittest.TestCase): ], "outputs": [], "baseCommand": "ls", - "arguments": [{"valueFrom": "$(runtime.outdir)"}] + "arguments": [{"valueFrom": "$(runtime.outdir)"}], + "id": "#" }) make_fs_access=functools.partial(arvados_cwl.CollectionFsAccess, collection_cache=arvados_cwl.CollectionCache(runner.api, None, 0))