self.ccs.start()
logger.debug(DBG_PROCESS, BIND10_STARTED_CC)
+ return self.ccs
+
# A couple of utility methods for starting processes...
def start_process(self, name, args, c_channel_env, port=None, address=None):
# this is set by ProcessInfo.spawn()
self.assertEqual(42147, pi.pid)
+ def test_start_ccsession(self):
+ '''Test that CC session is started.'''
+ class DummySession():
+ def __init__(self, specfile, config_handler, command_handler,
+ socket_file):
+ self.specfile = specfile
+ self.config_handler = config_handler
+ self.command_handler = command_handler
+ self.socket_file = socket_file
+ self.started = False
+ def start(self):
+ self.started = True
+ bob = MockBobSimple()
+ tmp = isc.config.ModuleCCSession
+ isc.config.ModuleCCSession = DummySession
+
+ ccs = bob.start_ccsession({})
+ self.assertEqual(bind10_src.SPECFILE_LOCATION, ccs.specfile)
+ self.assertEqual(bob.config_handler, ccs.config_handler)
+ self.assertEqual(bob.command_handler, ccs.command_handler)
+ self.assertEqual(bob.msgq_socket_file, ccs.socket_file)
+ self.assertTrue(ccs.started)
+
+ isc.config.ModuleCCSession = tmp
+
def test_start_process(self):
'''Test that processes can be started.'''
bob = MockBob()