Compare commits

...

2 Commits

Author SHA1 Message Date
1db59c0e61
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>
2024-09-17 00:40:49 +02:00
446b519e5d
Correct execute bit in map
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2024-09-17 00:35:16 +02:00
3 changed files with 105 additions and 47 deletions

View File

@ -52,7 +52,7 @@ def parse_permission(strpermission):
permap_s = {
'r': 'read',
'w': 'write',
'e': 'execute',
'x': 'execute',
}
outmap = DEFAULT_PERMISSIONS.copy()

View File

@ -1,5 +1,5 @@
---
- user:user:r:
user:user:r:
user:
user:
read: true
@ -20,7 +20,7 @@
read: true
write: false
execute: false
- user:user:-w-:
user:user:-w-:
user:
user:
read: false
@ -41,3 +41,66 @@
read: true
write: 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:
data = safe_load(fh)
out = []
for entry in data:
out.append(tuple(entry.items())[0])
return out
return list(data.items())
@mark.parametrize('aclin, aclout', load_yaml('matrix.yaml'))