Deleted
Added
test_python_isolation_chroot.py (1673:883f2f79c2f6) | test_python_isolation_chroot.py (1703:830ecc4a587c) |
---|---|
1import pytest 2 3from unit.applications.lang.python import TestApplicationPython 4from unit.feature.isolation import TestFeatureIsolation 5 6 7class TestPythonIsolation(TestApplicationPython): 8 prerequisites = {'modules': {'python': 'any'}} 9 10 def test_python_isolation_chroot(self, is_su, temp_dir): 11 if not is_su: 12 pytest.skip('requires root') 13 14 isolation = { 15 'rootfs': temp_dir, 16 } 17 | 1import pytest 2 3from unit.applications.lang.python import TestApplicationPython 4from unit.feature.isolation import TestFeatureIsolation 5 6 7class TestPythonIsolation(TestApplicationPython): 8 prerequisites = {'modules': {'python': 'any'}} 9 10 def test_python_isolation_chroot(self, is_su, temp_dir): 11 if not is_su: 12 pytest.skip('requires root') 13 14 isolation = { 15 'rootfs': temp_dir, 16 } 17 |
18 self.load('empty', isolation=isolation) 19 20 assert self.get()['status'] == 200, 'python chroot' 21 | |
22 self.load('ns_inspect', isolation=isolation) 23 24 assert ( 25 self.getjson(url='/?path=' + temp_dir)['body']['FileExists'] 26 == False 27 ), 'temp_dir does not exists in rootfs' 28 29 assert ( --- 18 unchanged lines hidden --- | 18 self.load('ns_inspect', isolation=isolation) 19 20 assert ( 21 self.getjson(url='/?path=' + temp_dir)['body']['FileExists'] 22 == False 23 ), 'temp_dir does not exists in rootfs' 24 25 assert ( --- 18 unchanged lines hidden --- |