diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2023-05-25 16:56:14 +0100 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2023-05-25 16:56:14 +0100 |
commit | 0132e552d0b9e8b724015728b5fbd7dad9d2edcb (patch) | |
tree | a24bd7e26e99e1b99b3d7ec806fb478c2388fd5e /test | |
parent | 18fcc07c7796889fe1cc4bc86564459ccd387ae7 (diff) | |
download | unit-0132e552d0b9e8b724015728b5fbd7dad9d2edcb.tar.gz unit-0132e552d0b9e8b724015728b5fbd7dad9d2edcb.tar.bz2 |
Tests: "temp_dir" fixture used were possible.
Diffstat (limited to '')
-rw-r--r-- | test/test_access_log.py | 2 | ||||
-rw-r--r-- | test/test_ruby_isolation.py | 4 | ||||
-rw-r--r-- | test/test_variables.py | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/test/test_access_log.py b/test/test_access_log.py index 86afb628..12f62aa9 100644 --- a/test/test_access_log.py +++ b/test/test_access_log.py @@ -291,7 +291,7 @@ Connection: close skip_alert(r'failed to apply new conf') assert 'error' in self.conf( - f'{option.temp_dir}/blah/access.log', + f'{temp_dir}/blah/access.log', 'access_log/path', ), 'access_log path incorrect' diff --git a/test/test_ruby_isolation.py b/test/test_ruby_isolation.py index ea208523..3ec06d86 100644 --- a/test/test_ruby_isolation.py +++ b/test/test_ruby_isolation.py @@ -6,7 +6,7 @@ from unit.option import option class TestRubyIsolation(TestApplicationRuby): prerequisites = {'modules': {'ruby': 'any'}, 'features': ['isolation']} - def test_ruby_isolation_rootfs(self, is_su): + def test_ruby_isolation_rootfs(self, is_su, temp_dir): isolation_features = option.available['features']['isolation'].keys() if not is_su: @@ -22,7 +22,7 @@ class TestRubyIsolation(TestApplicationRuby): if 'pid' not in isolation_features: pytest.skip('pid namespace is not supported') - isolation = {'rootfs': option.temp_dir} + isolation = {'rootfs': temp_dir} if not is_su: isolation['namespaces'] = { diff --git a/test/test_variables.py b/test/test_variables.py index 4b924147..970ad7b0 100644 --- a/test/test_variables.py +++ b/test/test_variables.py @@ -366,11 +366,11 @@ Connection: close check_no_cookie('fOo_bar=0') check_no_cookie('foo_bar=') - def test_variables_invalid(self): + def test_variables_invalid(self, temp_dir): def check_variables(format): assert 'error' in self.conf( { - 'path': f'{option.temp_dir}/access.log', + 'path': f'{temp_dir}/access.log', 'format': format, }, 'access_log', |