summaryrefslogtreecommitdiffhomepage
path: root/test/test_python_procman.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2018-02-26 20:18:24 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2018-02-26 20:18:24 +0300
commit6aa00fa8d08e3b937f707ce114c7095300118584 (patch)
treea6ef0004ec2ac8c575850be93f5de0302398af6e /test/test_python_procman.py
parenta89747e97c2a00503260d72082949be4ba97983f (diff)
downloadunit-6aa00fa8d08e3b937f707ce114c7095300118584.tar.gz
unit-6aa00fa8d08e3b937f707ce114c7095300118584.tar.bz2
Tests: more configuration tests.
Diffstat (limited to 'test/test_python_procman.py')
-rw-r--r--test/test_python_procman.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_python_procman.py b/test/test_python_procman.py
index f1187795..a2113f71 100644
--- a/test/test_python_procman.py
+++ b/test/test_python_procman.py
@@ -36,6 +36,22 @@ class TestUnitPythonProcman(unit.TestUnitApplicationPython):
self.assertIn('error', self.conf_get('/applications/' + self.app_name +
'/processes/idle_timeout'), 'idle_timeout no access')
+ def test_python_processes_spare_negative(self):
+ self.assertIn('error', self.conf({
+ "spare": -1
+ }, '/applications/' + self.app_name + '/processes'), 'negative spare')
+
+ def test_python_processes_max_negative(self):
+ self.assertIn('error', self.conf({
+ "max": -1
+ }, '/applications/' + self.app_name + '/processes'), 'negative max')
+
+ def test_python_processes_idle_timeout_negative(self):
+ self.assertIn('error', self.conf({
+ "idle_timeout": -1
+ }, '/applications/' + self.app_name + '/processes'),
+ 'negative idle_timeout')
+
def test_python_processes_spare_gt_max_default(self):
self.assertIn('error', self.conf({"spare": 2},
'/applications/' + self.app_name + '/processes'),