1
0
forked from Georg/pyacl

Improve test matrix

Simplify YAML structure and parsing by removing the superfluous list
layer.
Add additional matrix entries to cover more user ACL constellations.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2024-09-17 00:40:49 +02:00
parent 446b519e5d
commit 1db59c0e61
Signed by untrusted user: Georg
GPG Key ID: 1ED2F138E7E6FF57
2 changed files with 104 additions and 46 deletions

View File

@ -1,43 +1,106 @@
--- ---
- user:user:r: user:user:r:
user:
user: user:
user: read: true
read: true write: false
write: false execute: false
execute: false group:
group: null:
null: read: true
read: true write: false
write: false execute: false
execute: false mask:
mask: null:
null: read: true
read: true write: false
write: false execute: false
execute: false other:
other: null:
null: read: true
read: true write: false
write: false execute: false
execute: false user:user:-w-:
- user:user:-w-: user:
user: user:
user: read: false
read: false write: true
write: true execute: false
execute: false group:
group: null:
null: read: true
read: true write: false
write: false execute: false
execute: false mask:
mask: null:
null: read: true
read: true write: true
write: true execute: false
execute: false other:
other: null:
null: read: true
read: true write: false
write: false execute: false
execute: false user:user:--x:
user:
user:
read: false
write: false
execute: true
group:
null:
read: true
write: false
execute: false
mask:
null:
read: true
write: false
execute: true
other:
null:
read: true
write: false
execute: false
user:user:r-x:
user:
user:
read: true
write: false
execute: true
group:
null:
read: true
write: false
execute: false
mask:
null:
read: true
write: false
execute: true
other:
null:
read: true
write: false
execute: false
user:user:rwx:
user:
user:
read: true
write: true
execute: true
group:
null:
read: true
write: false
execute: false
mask:
null:
read: true
write: true
execute: true
other:
null:
read: true
write: false
execute: false

View File

@ -20,12 +20,7 @@ def load_yaml(file):
with open(join(dirname(__file__), file)) as fh: with open(join(dirname(__file__), file)) as fh:
data = safe_load(fh) data = safe_load(fh)
out = [] return list(data.items())
for entry in data:
out.append(tuple(entry.items())[0])
return out
@mark.parametrize('aclin, aclout', load_yaml('matrix.yaml')) @mark.parametrize('aclin, aclout', load_yaml('matrix.yaml'))