소스 검색

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,
                                       process_configs, buffer_size,
                                       pool_events, result_handler)
                                       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):
     def test_make_group(self):
         options = DummyOptions()
         options = DummyOptions()
         pconfigs = [DummyPConfig(options, 'process1', '/bin/process1')]
         pconfigs = [DummyPConfig(options, 'process1', '/bin/process1')]