diff --git a/test.sh b/test.sh index 5a5d9d4..3141b82 100755 --- a/test.sh +++ b/test.sh @@ -1,2 +1,11 @@ -#!/bin/sh -x -PYTHONPATH=. pytest --pdb --pdbcls=IPython.terminal.debugger:Pdb -rA -s -v -x +#!/bin/sh -ex + +command -v podman +wd='/work' +podman run \ + -it \ + --pull=always \ + --rm \ + -v .:/"$wd" \ + registry.opensuse.org/home/crameleon/containers/containers/crameleon/pytest-acl:latest \ + env PYTHONPATH=/"$wd" pytest --pdb --pdbcls=IPython.terminal.debugger:Pdb -rA -s -v -x "$wd"/tests diff --git a/tests/conftest.py b/tests/conftest.py index d254d48..65ab500 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -20,8 +20,8 @@ def sample_file(tmp_path_factory): file = directory / 'file_with_user_read_acl' file.touch() assert not file.read_text() # file should exist - run(['setfacl', '-m', 'u:georg2:r', file], check=True) + run(['setfacl', '-m', 'u:user:r', file], check=True) out = run(['getfacl', '-c', file], check=True, capture_output=True) - assert 'user:georg2:r--' in out.stdout.decode() # file should have the ACL set + assert 'user:user:r--' in out.stdout.decode() # file should have the ACL set yield file rmtree(directory) diff --git a/tests/test_pyacl.py b/tests/test_pyacl.py index b806f6e..c82b136 100644 --- a/tests/test_pyacl.py +++ b/tests/test_pyacl.py @@ -14,7 +14,7 @@ from pyacl import acl def test_parse_acl(sample_file): want = { 'user': { - 'georg2': { + 'user': { 'read': True, 'write': False, 'execute': False,