BIND 10 trac1294, updated. fd39e4e890ce175901311b9e11291628743edde4 [1294] makde sure the default value of use_ixfr actually applies (the previous test succeeds just by accident)
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Oct 12 17:31:31 UTC 2011
The branch, trac1294 has been updated
via fd39e4e890ce175901311b9e11291628743edde4 (commit)
via b9a2e86c2ee8d688a3e12877eb6dc4894a7eae24 (commit)
from ee7fff3113f67a7dddbf069e2a555e6dbac97f69 (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 fd39e4e890ce175901311b9e11291628743edde4
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Wed Oct 12 10:30:38 2011 -0700
[1294] makde sure the default value of use_ixfr actually applies
(the previous test succeeds just by accident)
commit b9a2e86c2ee8d688a3e12877eb6dc4894a7eae24
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Wed Oct 12 10:30:09 2011 -0700
[1294] simplify the code a bit
-----------------------------------------------------------------------
Summary of changes:
src/bin/xfrin/tests/xfrin_test.py | 17 +++++++++++++++++
src/bin/xfrin/xfrin.py.in | 3 +--
2 files changed, 18 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/xfrin/tests/xfrin_test.py b/src/bin/xfrin/tests/xfrin_test.py
index 0cb7dc2..2862431 100644
--- a/src/bin/xfrin/tests/xfrin_test.py
+++ b/src/bin/xfrin/tests/xfrin_test.py
@@ -98,10 +98,15 @@ class XfrinTestTimeoutException(Exception):
class MockCC():
def get_default_value(self, identifier):
+ # The returned values should be identical to the spec file
+ # XXX: these should be retrieved from the spec file
+ # (see MyCCSession of xfrout_test.py.in)
if identifier == "zones/master_port":
return TEST_MASTER_PORT
if identifier == "zones/class":
return TEST_RRCLASS_STR
+ if identifier == "zones/use_ixfr":
+ return False
class MockDataSourceClient():
'''A simple mock data source client.
@@ -2076,6 +2081,18 @@ class TestXfrin(unittest.TestCase):
# since this has failed, we should still have the previous config
self._check_zones_config(config2)
+ def test_config_handler_zones_default(self):
+ # Checking it some default config values apply. Using a separate
+ # test case for a fresh xfr object.
+ config = { 'zones': [
+ { 'name': 'test.example.',
+ 'master_addr': '192.0.2.1',
+ 'master_port': 53,
+ }
+ ]}
+ self.assertEqual(self.xfr.config_handler(config)['result'][0], 0)
+ self._check_zones_config(config)
+
def common_ixfr_setup(self, xfr_mode, use_ixfr):
# This helper method explicitly sets up a zone configuration with
# use_ixfr, and invokes either retransfer or refresh.
diff --git a/src/bin/xfrin/xfrin.py.in b/src/bin/xfrin/xfrin.py.in
index 59baa11..315d06a 100755
--- a/src/bin/xfrin/xfrin.py.in
+++ b/src/bin/xfrin/xfrin.py.in
@@ -876,8 +876,7 @@ class ZoneInfo:
self.set_master_port(config_data.get('master_port'))
self.set_zone_class(config_data.get('class'))
self.set_tsig_key(config_data.get('tsig_key'))
- use_ixfr = config_data.get('use_ixfr')
- self.set_use_ixfr(use_ixfr)
+ self.set_use_ixfr(config_data.get('use_ixfr'))
def set_name(self, name_str):
"""Set the name for this zone given a name string.
More information about the bind10-changes
mailing list