BIND 10 trac2582, updated. b0a6e5fff9ad673e6ba6a55797ab08b1349ecd8f [2582] Lettuce tests for msgq logging
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Jan 15 12:38:29 UTC 2013
The branch, trac2582 has been updated
via b0a6e5fff9ad673e6ba6a55797ab08b1349ecd8f (commit)
from 2283402c2b94545fa66cbc5e8f7294cb39924568 (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 b0a6e5fff9ad673e6ba6a55797ab08b1349ecd8f
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Tue Jan 15 13:36:09 2013 +0100
[2582] Lettuce tests for msgq logging
This way we check the logging works to the correct place and that the
configuration is handled. It is better checked by lettuce than unit
tests, since there's a lot of inter-module communication in it.
-----------------------------------------------------------------------
Summary of changes:
src/bin/msgq/msgq.py.in | 2 +-
src/bin/msgq/tests/msgq_test.py | 1 -
tests/lettuce/features/msgq.feature | 18 ++++++++++++++++++
3 files changed, 19 insertions(+), 2 deletions(-)
create mode 100644 tests/lettuce/features/msgq.feature
-----------------------------------------------------------------------
diff --git a/src/bin/msgq/msgq.py.in b/src/bin/msgq/msgq.py.in
index 84f9b4f..c163212 100755
--- a/src/bin/msgq/msgq.py.in
+++ b/src/bin/msgq/msgq.py.in
@@ -40,7 +40,7 @@ import isc.cc
isc.util.process.rename()
-isc.log.init("b10-msgq")
+isc.log.init("b10-msgq", buffer=True)
# Logger that is used in the actual msgq handling - startup, shutdown and the
# poller thread.
logger = isc.log.Logger("msgq")
diff --git a/src/bin/msgq/tests/msgq_test.py b/src/bin/msgq/tests/msgq_test.py
index cd13305..00e15d8 100644
--- a/src/bin/msgq/tests/msgq_test.py
+++ b/src/bin/msgq/tests/msgq_test.py
@@ -562,6 +562,5 @@ class ThreadTests(unittest.TestCase):
self.assertTrue(self.__result)
if __name__ == '__main__':
- isc.log.init("b10-msgq")
isc.log.resetUnitTestRootLogger()
unittest.main()
diff --git a/tests/lettuce/features/msgq.feature b/tests/lettuce/features/msgq.feature
new file mode 100644
index 0000000..19973f4
--- /dev/null
+++ b/tests/lettuce/features/msgq.feature
@@ -0,0 +1,18 @@
+Feature: Message queue tests
+ Tests for the message queue daemon.
+
+ Scenario: logging
+ # We check the message queue logs.
+ Given I have bind10 running with configuration default.config
+ And wait for bind10 stderr message BIND10_STARTED_CC
+ And wait for bind10 stderr message MSGQ_START
+ And wait for bind10 stderr message MSGQ_LISTENER_STARTED
+ And wait for bind10 stderr message MSGQ_CFGMGR_SUBSCRIBED
+ And wait for bind10 stderr message CMDCTL_STARTED
+
+ # Check it handles configuration. The configuration is invalid,
+ # but it should get there anyway and we abuse it.
+ # TODO: Once it has any kind of real command or configuration
+ # value, use that instead.
+ Then set bind10 configuration Msgq to {"nonsense": 1}
+ And wait for bind10 stderr message MSGQ_CONFIG_DATA
More information about the bind10-changes
mailing list