BIND 10 trac2353, updated. 77c012c47a2bd2ff161b8b62df065b3daa87ff73 [2353] Test BoB.start_ccsession()

BIND 10 source code commits bind10-changes at lists.isc.org
Sun Nov 18 22:50:51 UTC 2012


The branch, trac2353 has been updated
       via  77c012c47a2bd2ff161b8b62df065b3daa87ff73 (commit)
       via  d51421238cd7aa392c6baa967ee977a6d3dc8b7a (commit)
      from  a9ebc379b9d2f2501c8a4d497bb715f6c100cea8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 77c012c47a2bd2ff161b8b62df065b3daa87ff73
Author: Mukund Sivaraman <muks at isc.org>
Date:   Mon Nov 19 04:20:44 2012 +0530

    [2353] Test BoB.start_ccsession()

commit d51421238cd7aa392c6baa967ee977a6d3dc8b7a
Author: Mukund Sivaraman <muks at isc.org>
Date:   Mon Nov 19 04:11:03 2012 +0530

    [2353] Fix an error in comments

-----------------------------------------------------------------------

Summary of changes:
 src/bin/bind10/bind10_src.py.in        |    2 ++
 src/bin/bind10/tests/bind10_test.py.in |   27 ++++++++++++++++++++++++++-
 2 files changed, 28 insertions(+), 1 deletion(-)

-----------------------------------------------------------------------
diff --git a/src/bin/bind10/bind10_src.py.in b/src/bin/bind10/bind10_src.py.in
index 6d64c30..cfdbf90 100755
--- a/src/bin/bind10/bind10_src.py.in
+++ b/src/bin/bind10/bind10_src.py.in
@@ -503,6 +503,8 @@ class BoB:
         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):
diff --git a/src/bin/bind10/tests/bind10_test.py.in b/src/bin/bind10/tests/bind10_test.py.in
index f528ca0..a417210 100644
--- a/src/bin/bind10/tests/bind10_test.py.in
+++ b/src/bin/bind10/tests/bind10_test.py.in
@@ -1591,7 +1591,7 @@ class TestBossComponents(unittest.TestCase):
         self.assertEqual(42147, pi.pid)
 
     def test_start_cfgmgr(self):
-        '''Test that b10-msgq is started.'''
+        '''Test that b10-cfgmgr is started.'''
         class DummySession():
             def group_recvmsg(self):
                 return (None, None)
@@ -1651,6 +1651,31 @@ class TestBossComponents(unittest.TestCase):
         # 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()



More information about the bind10-changes mailing list