Skip to content

Commit 3dcd9a5

Browse files
author
root
committed
test: check community allowlists pairwise
1 parent b0b66fe commit 3dcd9a5

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

‎tests/test_github_workflows.py‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,15 @@ def test_community_submission_allowed_files_do_not_include_other_catalogs_or_doc
123123
for workflow, *_ in COMMUNITY_SUBMISSION_WORKFLOWS
124124
}
125125

126-
all_allowed_files = set().union(*allowed_by_workflow.values())
127-
128-
for workflow, allowed_files in allowed_by_workflow.items():
129-
assert allowed_files.isdisjoint(all_allowed_files - allowed_files)
126+
workflow_allowed_files = list(allowed_by_workflow.items())
127+
128+
for index, (workflow, allowed_files) in enumerate(workflow_allowed_files):
129+
for other_workflow, other_allowed_files in workflow_allowed_files[index + 1 :]:
130+
overlapping_files = allowed_files & other_allowed_files
131+
assert overlapping_files == set(), (
132+
f"{workflow} and {other_workflow} share allowed files: "
133+
f"{sorted(overlapping_files)}"
134+
)
130135

131136

132137
def test_bug_test_workflow_provisions_python_dependencies():

0 commit comments

Comments
 (0)