Tests: chroot test with permissions skipped under root.

This commit is contained in:
Andrei Zeliankou
2021-06-24 04:01:15 +01:00
parent 1e3f7808b1
commit 72420358be

View File

@@ -44,7 +44,10 @@ class TestShareChroot(TestApplicationProto):
assert self.get(url='/index.html')['status'] == 403, 'chroot 403 2' assert self.get(url='/index.html')['status'] == 403, 'chroot 403 2'
assert self.get(url='/file')['status'] == 403, 'chroot 403' assert self.get(url='/file')['status'] == 403, 'chroot 403'
def test_share_chroot_permission(self, temp_dir): def test_share_chroot_permission(self, is_su, temp_dir):
if is_su:
pytest.skip('does\'t work under root')
os.chmod(temp_dir + '/assets/dir', 0o100) os.chmod(temp_dir + '/assets/dir', 0o100)
assert 'success' in self.conf( assert 'success' in self.conf(