summaryrefslogtreecommitdiffhomepage
path: root/test/test_python_isolation.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2022-12-09 14:17:49 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2022-12-09 14:17:49 +0000
commit55b9a5307d705da91d3ef317639356c748853a7c (patch)
treec54f3375f0b1b233e5c28a1ab9d6199c84314ca1 /test/test_python_isolation.py
parente70653c76606293e3687b05bbd8b5c06d700fb8b (diff)
downloadunit-55b9a5307d705da91d3ef317639356c748853a7c.tar.gz
unit-55b9a5307d705da91d3ef317639356c748853a7c.tar.bz2
Tests: fixed tests to run as privileged user.
Diffstat (limited to 'test/test_python_isolation.py')
-rw-r--r--test/test_python_isolation.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/test_python_isolation.py b/test/test_python_isolation.py
index 8cef6812..db398444 100644
--- a/test/test_python_isolation.py
+++ b/test/test_python_isolation.py
@@ -63,24 +63,25 @@ class TestPythonIsolation(TestApplicationPython):
pytest.skip('requires root')
isolation = {'rootfs': temp_dir, 'automount': {'language_deps': False}}
-
self.load('empty', isolation=isolation)
- assert findmnt().find(temp_dir) == -1
+ python_path = temp_dir + '/usr'
+
+ assert findmnt().find(python_path) == -1
assert self.get()['status'] != 200, 'disabled language_deps'
- assert findmnt().find(temp_dir) == -1
+ assert findmnt().find(python_path) == -1
isolation['automount']['language_deps'] = True
self.load('empty', isolation=isolation)
- assert findmnt().find(temp_dir) == -1
+ assert findmnt().find(python_path) == -1
assert self.get()['status'] == 200, 'enabled language_deps'
- assert waitformount(temp_dir), 'language_deps mount'
+ assert waitformount(python_path), 'language_deps mount'
self.conf({"listeners": {}, "applications": {}})
- assert waitforunmount(temp_dir), 'language_deps unmount'
+ assert waitforunmount(python_path), 'language_deps unmount'
def test_python_isolation_procfs(self, is_su, temp_dir):
if not is_su: