Tests: "temp_dir" fixture used were possible.
This commit is contained in:
@@ -291,7 +291,7 @@ Connection: close
|
|||||||
skip_alert(r'failed to apply new conf')
|
skip_alert(r'failed to apply new conf')
|
||||||
|
|
||||||
assert 'error' in self.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',
|
||||||
), 'access_log path incorrect'
|
), 'access_log path incorrect'
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from unit.option import option
|
|||||||
class TestRubyIsolation(TestApplicationRuby):
|
class TestRubyIsolation(TestApplicationRuby):
|
||||||
prerequisites = {'modules': {'ruby': 'any'}, 'features': ['isolation']}
|
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()
|
isolation_features = option.available['features']['isolation'].keys()
|
||||||
|
|
||||||
if not is_su:
|
if not is_su:
|
||||||
@@ -22,7 +22,7 @@ class TestRubyIsolation(TestApplicationRuby):
|
|||||||
if 'pid' not in isolation_features:
|
if 'pid' not in isolation_features:
|
||||||
pytest.skip('pid namespace is not supported')
|
pytest.skip('pid namespace is not supported')
|
||||||
|
|
||||||
isolation = {'rootfs': option.temp_dir}
|
isolation = {'rootfs': temp_dir}
|
||||||
|
|
||||||
if not is_su:
|
if not is_su:
|
||||||
isolation['namespaces'] = {
|
isolation['namespaces'] = {
|
||||||
|
|||||||
@@ -366,11 +366,11 @@ Connection: close
|
|||||||
check_no_cookie('fOo_bar=0')
|
check_no_cookie('fOo_bar=0')
|
||||||
check_no_cookie('foo_bar=')
|
check_no_cookie('foo_bar=')
|
||||||
|
|
||||||
def test_variables_invalid(self):
|
def test_variables_invalid(self, temp_dir):
|
||||||
def check_variables(format):
|
def check_variables(format):
|
||||||
assert 'error' in self.conf(
|
assert 'error' in self.conf(
|
||||||
{
|
{
|
||||||
'path': f'{option.temp_dir}/access.log',
|
'path': f'{temp_dir}/access.log',
|
||||||
'format': format,
|
'format': format,
|
||||||
},
|
},
|
||||||
'access_log',
|
'access_log',
|
||||||
|
|||||||
Reference in New Issue
Block a user