From ca85a1910bfb9b064698f654e62dd7e57fe78a26 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Wed, 14 Dec 2022 15:33:58 -0500 Subject: [PATCH] Update copy_deps test, refs #19688 It now creates an additional collection containing the workflow text, the test needed to be updated to reflect that. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- sdk/cwl/tests/test_copy_deps.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/sdk/cwl/tests/test_copy_deps.py b/sdk/cwl/tests/test_copy_deps.py index 853a7d3609..230430d86c 100644 --- a/sdk/cwl/tests/test_copy_deps.py +++ b/sdk/cwl/tests/test_copy_deps.py @@ -9,8 +9,8 @@ api = arvados.api() def check_contents(group, wf_uuid): contents = api.groups().contents(uuid=group["uuid"]).execute() - if len(contents["items"]) != 3: - raise Exception("Expected 3 items in "+group["uuid"]+" was "+len(contents["items"])) + if len(contents["items"]) != 4: + raise Exception("Expected 4 items in "+group["uuid"]+" was "+str(len(contents["items"]))) found = False for c in contents["items"]: @@ -33,6 +33,13 @@ def check_contents(group, wf_uuid): if not found: raise Exception("Couldn't find jobs image dependency") + found = False + for c in contents["items"]: + if c["kind"] == "arvados#collection" and c["portable_data_hash"] == "13d3901489516f9986c9685867043d39+61": + found = True + if not found: + raise Exception("Couldn't find collection containing workflow") + def test_create(): group = api.groups().create(body={"group": {"name": "test-19070-project-1", "group_class": "project"}}, ensure_unique_name=True).execute() @@ -65,8 +72,8 @@ def test_update(): wf_uuid = wf_uuid.decode("utf-8").strip() contents = api.groups().contents(uuid=group["uuid"]).execute() - if len(contents["items"]) != 1: - raise Exception("Expected 1 items") + if len(contents["items"]) != 2: + raise Exception("Expected 2 items") found = False for c in contents["items"]: @@ -75,6 +82,13 @@ def test_update(): if not found: raise Exception("Couldn't find workflow") + found = False + for c in contents["items"]: + if c["kind"] == "arvados#collection" and c["portable_data_hash"] == "13d3901489516f9986c9685867043d39+61": + found = True + if not found: + raise Exception("Couldn't find collection containing workflow") + # Updating by default will copy missing items cmd = ["arvados-cwl-runner", "--update-workflow", wf_uuid, "19070-copy-deps.cwl"] print(" ".join(cmd)) -- 2.30.2