X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/035b113f60302f6d9c265e6e3a63dbb3c5873153..28225aeb0336a4872bbaa3aae5d331172f1e4068:/sdk/cwl/tests/test_submit.py diff --git a/sdk/cwl/tests/test_submit.py b/sdk/cwl/tests/test_submit.py index c1e9629fc8..c7ededd796 100644 --- a/sdk/cwl/tests/test_submit.py +++ b/sdk/cwl/tests/test_submit.py @@ -612,6 +612,30 @@ class TestSubmit(unittest.TestCase): self.assertEqual(capture_stdout.getvalue(), stubs.expect_container_request_uuid + '\n') + @stubs + def test_submit_storage_classes(self, stubs): + capture_stdout = cStringIO.StringIO() + try: + exited = arvados_cwl.main( + ["--debug", "--submit", "--no-wait", "--api=containers", "--storage-classes=foo", + "tests/wf/submit_wf.cwl", "tests/submit_test_job.json"], + capture_stdout, sys.stderr, api_client=stubs.api, keep_client=stubs.keep_client) + self.assertEqual(exited, 0) + except: + logging.exception("") + + expect_container = copy.deepcopy(stubs.expect_container_spec) + expect_container["command"] = ['arvados-cwl-runner', '--local', '--api=containers', + '--no-log-timestamps', '--disable-validate', + '--eval-timeout=20', '--thread-count=4', + '--enable-reuse', "--debug", + "--storage-classes=foo", '--on-error=continue', + '/var/lib/cwl/workflow.json#main', '/var/lib/cwl/cwl.input.json'] + + stubs.api.container_requests().create.assert_called_with( + body=JsonDiffMatcher(expect_container)) + self.assertEqual(capture_stdout.getvalue(), + stubs.expect_container_request_uuid + '\n') @stubs def test_submit_container_output_ttl(self, stubs):