diff options
author | Tiago Natel de Moura <t.nateldemoura@f5.com> | 2020-10-29 14:31:37 +0000 |
---|---|---|
committer | Tiago Natel de Moura <t.nateldemoura@f5.com> | 2020-10-29 14:31:37 +0000 |
commit | 417f5d911ddb3a46b590d89e73313856a32ff435 (patch) | |
tree | 5ed4ebade47a245916a04332bdac9dd32cce2730 /test/test_ruby_isolation.py | |
parent | 5ffd88ad7c682f4bc60702d8829d1534aafb09e8 (diff) | |
download | unit-417f5d911ddb3a46b590d89e73313856a32ff435.tar.gz unit-417f5d911ddb3a46b590d89e73313856a32ff435.tar.bz2 |
Tests: added new ruby isolation test without namespaces.
Diffstat (limited to 'test/test_ruby_isolation.py')
-rw-r--r-- | test/test_ruby_isolation.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/test_ruby_isolation.py b/test/test_ruby_isolation.py index bf934540..79c94ba2 100644 --- a/test/test_ruby_isolation.py +++ b/test/test_ruby_isolation.py @@ -26,7 +26,7 @@ class TestRubyIsolation(TestApplicationRuby): return check if not complete_check else check() - def test_ruby_isolation_rootfs(self, is_su): + def test_ruby_isolation_rootfs_mount_namespace(self, is_su): isolation_features = option.available['features']['isolation'].keys() if 'mnt' not in isolation_features: @@ -55,3 +55,22 @@ class TestRubyIsolation(TestApplicationRuby): ) assert self.get()['status'] == 200, 'status int' + + def test_ruby_isolation_rootfs(self, is_su): + if not is_su: + pytest.skip('requires root') + return + + isolation = {'rootfs': option.test_dir} + + self.load('status_int', isolation=isolation) + + assert 'success' in self.conf( + '"/ruby/status_int/config.ru"', 'applications/status_int/script', + ) + + assert 'success' in self.conf( + '"/ruby/status_int"', 'applications/status_int/working_directory', + ) + + assert self.get()['status'] == 200, 'status int' |