From: Peter Amstutz Date: Fri, 9 Sep 2022 14:30:37 +0000 (-0400) Subject: Test fixing wip X-Git-Tag: 2.5.0~79^2~1 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/c122ff50a49bae1b60ba3eb85826686ad8ab0b4b Test fixing wip Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/sdk/cwl/arvados_cwl/executor.py b/sdk/cwl/arvados_cwl/executor.py index 34d50c1b6b..5c74eb1f98 100644 --- a/sdk/cwl/arvados_cwl/executor.py +++ b/sdk/cwl/arvados_cwl/executor.py @@ -520,7 +520,8 @@ The 'jobs' API is no longer supported. for req in job_reqs: tool.requirements.append(req) - def get_git_info(self, tool): + @staticmethod + def get_git_info(tool): in_a_git_repo = False cwd = None filepath = None diff --git a/sdk/cwl/tests/test_submit.py b/sdk/cwl/tests/test_submit.py index a726ec5017..59fa2af246 100644 --- a/sdk/cwl/tests/test_submit.py +++ b/sdk/cwl/tests/test_submit.py @@ -19,6 +19,7 @@ import sys import unittest import cwltool.process import re +import os from io import BytesIO @@ -273,9 +274,17 @@ def stubs(wfname='submit_wf.cwl'): stubs.api.pipeline_instances().create().execute.return_value = stubs.pipeline_create stubs.api.pipeline_instances().get().execute.return_value = stubs.pipeline_with_job - with open("tests/wf/submit_wf_packed.cwl") as f: + cwd = os.getcwd() + filepath = os.path.join(cwd, "tests/wf/submit_wf_packed.cwl") + with open(filepath) as f: expect_packed_workflow = yaml.round_trip_load(f) + expect_packed_workflow["id"] = "file://" + filepath + mocktool = mock.NonCallableMock(tool=expect_packed_workflow, metadata=expect_packed_workflow) + + git_info = arvados_cwl.executor.ArvCwlExecutor.get_git_info(mocktool) + expect_packed_workflow.update(git_info) + stubs.expect_container_spec = { 'priority': 500, 'mounts': {