BIND 10 trac2436, updated. 92db29d982892679b7ef097f55975357c5abc759 [2436] Adjust old loadzone tests
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Jan 8 15:15:34 UTC 2013
The branch, trac2436 has been updated
via 92db29d982892679b7ef097f55975357c5abc759 (commit)
from 8dc51055585e92db23cfb97fd280a10eecf3ff7a (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 92db29d982892679b7ef097f55975357c5abc759
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Tue Jan 8 16:12:45 2013 +0100
[2436] Adjust old loadzone tests
They were expecting the loadzone would just warn, not fail, on the bad
zone data.
-----------------------------------------------------------------------
Summary of changes:
src/bin/loadzone/tests/loadzone_test.py | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/loadzone/tests/loadzone_test.py b/src/bin/loadzone/tests/loadzone_test.py
index 4f13c5d..d1ee131 100755
--- a/src/bin/loadzone/tests/loadzone_test.py
+++ b/src/bin/loadzone/tests/loadzone_test.py
@@ -237,7 +237,7 @@ class TestLoadZoneRunner(unittest.TestCase):
self.__check_zone_soa(None, zone_name=Name('example.com'))
def __common_post_load_setup(self, zone_file):
- '''Common setup procedure for post load tests.'''
+ '''Common setup procedure for post load tests which should fail.'''
# replace the LoadZoneRunner's original _post_load_warning() for
# inspection
self.__warnings = []
@@ -248,26 +248,18 @@ class TestLoadZoneRunner(unittest.TestCase):
self.__common_load_setup()
self.__runner._zone_file = zone_file
self.__check_zone_soa(ORIG_SOA_TXT)
- self.__runner._do_load()
- self.__runner._post_load_checks()
+ # It fails because there's problem with the zone data
+ self.assertRaises(LoadFailure, self.__runner._do_load)
def test_load_post_check_fail_soa(self):
'''Load succeeds but warns about missing SOA, should cause warn'''
- self.__common_load_setup()
self.__common_post_load_setup(LOCAL_TESTDATA_PATH +
'/example-nosoa.org.zone')
- self.__check_zone_soa(False)
- self.assertEqual(1, len(self.__warnings))
- self.assertEqual('zone has no SOA', self.__warnings[0])
def test_load_post_check_fail_ns(self):
'''Load succeeds but warns about missing NS, should cause warn'''
- self.__common_load_setup()
self.__common_post_load_setup(LOCAL_TESTDATA_PATH +
'/example-nons.org.zone')
- self.__check_zone_soa(NEW_SOA_TXT)
- self.assertEqual(1, len(self.__warnings))
- self.assertEqual('zone has no NS', self.__warnings[0])
def __interrupt_progress(self, loaded_rrs):
'''A helper emulating a signal in the middle of loading.
More information about the bind10-changes
mailing list