From b75d110fe1a5ad9e928c0dba1bd2a2978c9dd6ea Mon Sep 17 00:00:00 2001 From: Francis Charette Migneault Date: Mon, 14 Nov 2022 18:07:23 -0500 Subject: [PATCH] adjust workflow test considering possible distinct permissions during listing --- tests/functional/test_workflow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/functional/test_workflow.py b/tests/functional/test_workflow.py index 0f4bb119a..dcc7e43ce 100644 --- a/tests/functional/test_workflow.py +++ b/tests/functional/test_workflow.py @@ -1222,10 +1222,11 @@ def mock_tmp_input(requests_mock): # only the file names should remain (not nested dirs), as per the directory listing package definition # perform initial check that output from 'ls' is found output_lines = list(filter(lambda _line: bool(_line), output_data.split("\n"))) + pattern_perms = re.compile(r"-rw-[r-][w-]-r-- .*") # group perms variable on different platforms self.assert_test( lambda: ( len(output_lines) == len(expect_http_files) and - all(line.startswith("-rw-rw-r-- ") for line in output_lines) and + all(re.match(pattern_perms, line) for line in output_lines) and all(" /var/lib/cwl/stg" in line for line in output_lines) ), message="Workflow output file expected to contain single file with raw string listing of "