浏览代码

Add test for after_setuid()

Mike Naberezny 10 年之前
父节点
当前提交
8ba4b11d23
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      supervisor/tests/test_options.py

+ 7 - 0
supervisor/tests/test_options.py

@@ -2728,6 +2728,13 @@ class EventListenerPoolConfigTests(unittest.TestCase):
                                       process_configs, buffer_size,
                                       pool_events, result_handler)
 
+    def test_after_setuid(self):
+        options = DummyOptions()
+        pconfigs = [DummyPConfig(options, 'process1', '/bin/process1')]
+        instance = self._makeOne(options, 'name', 999, pconfigs, 1, [], None)
+        instance.after_setuid()
+        self.assertEqual(pconfigs[0].autochildlogs_created, True)
+
     def test_make_group(self):
         options = DummyOptions()
         pconfigs = [DummyPConfig(options, 'process1', '/bin/process1')]