BIND 10 trac2439, updated. 21a9a30e94cfa668daef86935894d6b5257179f0 [2439] Call the check callbacks from tests
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Jan 28 13:47:35 UTC 2013
The branch, trac2439 has been updated
via 21a9a30e94cfa668daef86935894d6b5257179f0 (commit)
from f7c0e1bf2a90711cd6df426b17465eedafaade00 (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 21a9a30e94cfa668daef86935894d6b5257179f0
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Mon Jan 28 14:28:17 2013 +0100
[2439] Call the check callbacks from tests
Test they have no side effects as to the acceptance of the zone, just
log stuff.
-----------------------------------------------------------------------
Summary of changes:
src/bin/xfrin/tests/xfrin_test.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
-----------------------------------------------------------------------
diff --git a/src/bin/xfrin/tests/xfrin_test.py b/src/bin/xfrin/tests/xfrin_test.py
index ab8c6d0..2370708 100644
--- a/src/bin/xfrin/tests/xfrin_test.py
+++ b/src/bin/xfrin/tests/xfrin_test.py
@@ -754,6 +754,10 @@ class TestXfrinConnection(unittest.TestCase):
A mock function used instead of dns.check_zone.
'''
self._check_zone_params = (name, rrclass, rrsets, callbacks)
+ # Call both callbacks to see they do nothing. This checks
+ # the transfer depends on the result only.
+ callbacks[0]("Test error")
+ callbacks[1]("Test warning")
return self._check_zone_result
def _create_normal_response_data(self):
@@ -1551,6 +1555,15 @@ class TestAXFR(TestXfrinConnection):
self.conn.response_generator = self._create_normal_response_data
self.assertEqual(self.conn.do_xfrin(False), XFRIN_FAIL)
+ def test_do_xfrin_invalid_zone(self):
+ """
+ Test receiving an invalid zone. We mock the check and see the whole
+ transfer is rejected.
+ """
+ self._check_zone_result = False
+ self.conn.response_generator = self._create_normal_response_data
+ self.assertEqual(self.conn.do_xfrin(False), XFRIN_FAIL)
+
def test_do_soacheck_and_xfrin(self):
self.conn.response_generator = self._create_soa_response_data
self.assertEqual(self.conn.do_xfrin(True), XFRIN_OK)
More information about the bind10-changes
mailing list