]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2353] Add test for BoB.start_simple()
authorMukund Sivaraman <muks@isc.org>
Tue, 6 Nov 2012 09:29:47 +0000 (14:59 +0530)
committerMukund Sivaraman <muks@isc.org>
Tue, 6 Nov 2012 09:29:47 +0000 (14:59 +0530)
src/bin/bind10/tests/bind10_test.py.in

index 3b2b7eedb556ce312b3271a53f4de61a6de04df0..030c72be739e0bd75ca16357a0bb2d80b3addeea 100644 (file)
@@ -1401,6 +1401,17 @@ class TestBossComponents(unittest.TestCase):
         bob.register_process(53, component)
         self.assertEqual([[53, 'test', 'Test']], bob.get_processes())
 
+    def test_start_simple(self):
+        '''Test simple process startup.'''
+        bob = BoB()
+        bob.verbose = False
+        bob.c_channel_env = {}
+        pi = bob.start_simple('/bin/true')
+        self.assertEqual('/bin/true', pi.name)
+        self.assertEqual(['/bin/true'], pi.args)
+        self.assertEqual({}, pi.env)
+        self.assertNotEqual(0, pi.pid)
+
 class SocketSrvTest(unittest.TestCase):
     """
     This tests some methods of boss related to the unix domain sockets used