Browse Source

[2353] Add test for BoB.start_process()

Mukund Sivaraman 12 years ago
parent
commit
b0db66ca29
1 changed files with 9 additions and 0 deletions
  1. 9 0
      src/bin/bind10/tests/bind10_test.py.in

+ 9 - 0
src/bin/bind10/tests/bind10_test.py.in

@@ -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