BIND 10 trac2353, updated. 36d2b848c6badf00bae61bd958b891b7e2acc8cd [2353] Test port arg in BoB.start_cmdctl()
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Nov 15 06:49:59 UTC 2012
The branch, trac2353 has been updated
via 36d2b848c6badf00bae61bd958b891b7e2acc8cd (commit)
via 4f52e898a7b69228cf4a8ab70d78844ad9dc45e1 (commit)
via c2c64eae1f3e6140bbe30e963797b9a4efa5a9f8 (commit)
via 230de14b1b3e31b2f436cfd370e149a98926522e (commit)
via 54a707d39ae1943731ed2043f8d44424c434f0e3 (commit)
via 51bd304db036e8d2e6008a98b2dae01eea126e41 (commit)
via da1b2d7dc0a367ed168b366df1ab5c5af82260d4 (commit)
from d5c0c97ef8bf7d4b9ae2709b8a92eb1532f4c9b9 (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 36d2b848c6badf00bae61bd958b891b7e2acc8cd
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Nov 15 12:18:43 2012 +0530
[2353] Test port arg in BoB.start_cmdctl()
commit 4f52e898a7b69228cf4a8ab70d78844ad9dc45e1
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Nov 15 12:17:20 2012 +0530
[2353] Test verbose case of BoB.start_cmdctl()
commit c2c64eae1f3e6140bbe30e963797b9a4efa5a9f8
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Nov 15 12:15:52 2012 +0530
[2353] Test verbose case of BoB.start_resolver()
commit 230de14b1b3e31b2f436cfd370e149a98926522e
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Nov 15 12:14:56 2012 +0530
[2353] Test verbose case of BoB.start_auth()
commit 54a707d39ae1943731ed2043f8d44424c434f0e3
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Nov 15 12:12:37 2012 +0530
[2353] Remove the digit suffix from tests
The conflicting test names are in a different class.
commit 51bd304db036e8d2e6008a98b2dae01eea126e41
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Nov 15 11:53:34 2012 +0530
[2353] Rename MockBob2 to MockBobSimple
commit da1b2d7dc0a367ed168b366df1ab5c5af82260d4
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Nov 15 11:53:07 2012 +0530
[2353] Rewrite test_start_simple() to use MockBob2
-----------------------------------------------------------------------
Summary of changes:
src/bin/bind10/tests/bind10_test.py.in | 64 +++++++++++++++++++++++---------
1 file changed, 47 insertions(+), 17 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/bind10/tests/bind10_test.py.in b/src/bin/bind10/tests/bind10_test.py.in
index 27f7982..debf0cf 100644
--- a/src/bin/bind10/tests/bind10_test.py.in
+++ b/src/bin/bind10/tests/bind10_test.py.in
@@ -717,7 +717,7 @@ class MockBob(BoB):
self.get_process_exit_status_called = True
return (53, 0)
-class MockBob2(BoB):
+class MockBobSimple(BoB):
def __init__(self):
BoB.__init__(self)
# Set which process has been started
@@ -1480,53 +1480,83 @@ class TestBossComponents(unittest.TestCase):
def test_start_simple(self):
'''Test simple process startup.'''
- bob = BoB()
+ bob = MockBobSimple()
bob.c_channel_env = {}
# non-verbose case
bob.verbose = False
- 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)
+ bob.start_simple('/bin/true')
+ self.assertEqual('/bin/true', bob.started_process_name)
+ self.assertEqual(['/bin/true'], bob.started_process_args)
# verbose case
bob.verbose = True
- pi = bob.start_simple('/bin/true')
- self.assertEqual('/bin/true', pi.name)
- self.assertEqual(['/bin/true', '-v'], pi.args)
- self.assertEqual({}, pi.env)
- self.assertNotEqual(0, pi.pid)
+ bob.start_simple('/bin/true')
+ self.assertEqual('/bin/true', bob.started_process_name)
+ self.assertEqual(['/bin/true', '-v'], bob.started_process_args)
# there is another test with this name (minus the digits), but both
# do different things.
- def test_start_auth2(self):
+ def test_start_auth(self):
'''Test that b10-auth is started.'''
- bob = MockBob2()
+ bob = MockBobSimple()
bob.c_channel_env = {}
+
+ # non-verbose case
+ bob.verbose = False
bob.start_auth()
self.assertEqual('b10-auth', bob.started_process_name)
self.assertEqual(['b10-auth'], bob.started_process_args)
+ # verbose case
+ bob.verbose = True
+ bob.start_auth()
+ self.assertEqual('b10-auth', bob.started_process_name)
+ self.assertEqual(['b10-auth', '-v'], bob.started_process_args)
+
# there is another test with this name (minus the digits), but both
# do different things.
- def test_start_resolver2(self):
+ def test_start_resolver(self):
'''Test that b10-resolver is started.'''
- bob = MockBob2()
+ bob = MockBobSimple()
bob.c_channel_env = {}
+
+ # non-verbose case
+ bob.verbose = False
bob.start_resolver()
self.assertEqual('b10-resolver', bob.started_process_name)
self.assertEqual(['b10-resolver'], bob.started_process_args)
+ # verbose case
+ bob.verbose = True
+ bob.start_resolver()
+ self.assertEqual('b10-resolver', bob.started_process_name)
+ self.assertEqual(['b10-resolver', '-v'], bob.started_process_args)
+
def test_start_cmdctl(self):
'''Test that b10-cmdctl is started.'''
- bob = MockBob2()
+ bob = MockBobSimple()
bob.c_channel_env = {}
+
+ # non-verbose case
+ bob.verbose = False
bob.start_cmdctl()
self.assertEqual('b10-cmdctl', bob.started_process_name)
self.assertEqual(['b10-cmdctl'], bob.started_process_args)
+ # verbose case
+ bob.verbose = True
+ bob.start_cmdctl()
+ self.assertEqual('b10-cmdctl', bob.started_process_name)
+ self.assertEqual(['b10-cmdctl', '-v'], bob.started_process_args)
+
+ # with port
+ bob.verbose = True
+ bob.cmdctl_port = 9353
+ bob.start_cmdctl()
+ self.assertEqual('b10-cmdctl', bob.started_process_name)
+ self.assertEqual(['b10-cmdctl', '--port=9353', '-v'], bob.started_process_args)
+
class SocketSrvTest(unittest.TestCase):
"""
This tests some methods of boss related to the unix domain sockets used
More information about the bind10-changes
mailing list