]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2353] Add test for BoB.start_process()
authorMukund Sivaraman <muks@isc.org>
Tue, 6 Nov 2012 08:23:21 +0000 (13:53 +0530)
committerMukund Sivaraman <muks@isc.org>
Tue, 6 Nov 2012 08:26:17 +0000 (13:56 +0530)
src/bin/bind10/tests/bind10_test.py.in

index 8a0c60756181c0f4c4a4d5ef6daed1e38117f410..ab25ab1003c7a33298b5739d5921c9b7459ef2ec 100644 (file)
@@ -1384,6 +1384,15 @@ class TestBossComponents(unittest.TestCase):
         bob.kill_started_components()
         self.assertEqual([], bob.get_processes())
 
+    def test_start_process(self):
+        '''Test that processes can be started.'''
+        bob = MockBob()
+        pi = bob.start_process('Test Process', ['/bin/true'], {})
+        self.assertEqual('Test Process', 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