BIND 10 trac930, updated. afc497e50cef8491e5df06f5ae3bcd4ec0cbb1a3 [trac930] add a test pattern which the set command with a non-existent item name is sent
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Jul 27 01:20:03 UTC 2011
The branch, trac930 has been updated
via afc497e50cef8491e5df06f5ae3bcd4ec0cbb1a3 (commit)
via ba8b24921d6a813615f6cf0184112ca31916127d (commit)
from 4b9e480b8b852b1de510ca55f2d4aaf85edf2997 (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 afc497e50cef8491e5df06f5ae3bcd4ec0cbb1a3
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Jul 27 10:18:07 2011 +0900
[trac930] add a test pattern which the set command with a non-existent item
name is sent
commit ba8b24921d6a813615f6cf0184112ca31916127d
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Jul 27 10:14:57 2011 +0900
[trac930] modify parse_spec function
returns empty dict if list-type is not specified in the argument
-----------------------------------------------------------------------
Summary of changes:
src/bin/stats/stats.py.in | 1 +
src/bin/stats/tests/b10-stats_test.py | 11 ++++++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/stats/stats.py.in b/src/bin/stats/stats.py.in
index 3faa305..1abe449 100644
--- a/src/bin/stats/stats.py.in
+++ b/src/bin/stats/stats.py.in
@@ -72,6 +72,7 @@ def parse_spec(spec):
"""
parse spec type data
"""
+ if type(spec) is not list: return {}
def _parse_spec(spec):
item_type = spec['item_type']
if item_type == "integer":
diff --git a/src/bin/stats/tests/b10-stats_test.py b/src/bin/stats/tests/b10-stats_test.py
index b013c7a..6ddd39b 100644
--- a/src/bin/stats/tests/b10-stats_test.py
+++ b/src/bin/stats/tests/b10-stats_test.py
@@ -69,7 +69,7 @@ class TestUtilties(unittest.TestCase):
'test_list2' : [0,0,0],
'test_map2' : { 'A' : 0, 'B' : 0, 'C' : 0 },
'test_none' : None })
- self.assertRaises(TypeError, stats.parse_spec, None)
+ self.assertEqual(stats.parse_spec(None), {})
self.assertRaises(KeyError, stats.parse_spec, [{'item_name':'Foo'}])
def test_get_timestamp(self):
@@ -488,6 +488,15 @@ class TestStats(unittest.TestCase):
isc.config.create_answer(
1,
"specified module name and/or statistics data are incorrect:"
+ + " unknown item lname"))
+ self.stats.statistics_data['Stats'] = {}
+ self.stats.mccs.specification = isc.config.module_spec.ModuleSpec(
+ { "module_name": self.stats.module_name } )
+ self.assertEqual(self.stats.command_set(owner='Stats',
+ data={ 'lname' : '_foo_ at _bar_' }),
+ isc.config.create_answer(
+ 1,
+ "specified module name and/or statistics data are incorrect:"
+ " No statistics specification"))
self.stats.statistics_data['Stats'] = {}
self.stats.mccs.specification = isc.config.module_spec.ModuleSpec(
More information about the bind10-changes
mailing list