|
@@ -1891,7 +1891,7 @@ class TestXfrin(unittest.TestCase):
|
|
|
self.assertEqual(self.xfr.command_handler("notify",
|
|
|
self.args)['result'][0], 1)
|
|
|
|
|
|
- def test_command_handler_notify_known_zone(self):
|
|
|
+ def test_command_handler_notify_known_zone_bad_addr(self):
|
|
|
# try it with a known zone
|
|
|
self.args['master'] = TEST_MASTER_IPV6_ADDRESS
|
|
|
|
|
@@ -1903,6 +1903,23 @@ class TestXfrin(unittest.TestCase):
|
|
|
}
|
|
|
]}
|
|
|
self.xfr.config_handler(zones)
|
|
|
+ # the command should now fail
|
|
|
+ self.assertEqual(self.xfr.command_handler("notify",
|
|
|
+ self.args)['result'][0], 1)
|
|
|
+
|
|
|
+ def test_command_handler_notify_known_zone(self):
|
|
|
+ # try it with a known zone
|
|
|
+ self.args['master'] = TEST_MASTER_IPV6_ADDRESS
|
|
|
+
|
|
|
+ # but use a different address in the actual command
|
|
|
+ zones = { 'zones': [
|
|
|
+ { 'name': TEST_ZONE_NAME_STR,
|
|
|
+ 'master_addr': TEST_MASTER_IPV6_ADDRESS,
|
|
|
+ 'master_port': TEST_MASTER_PORT
|
|
|
+ }
|
|
|
+ ]}
|
|
|
+ self.xfr.config_handler(zones)
|
|
|
+ # the command should now fail
|
|
|
self.assertEqual(self.xfr.command_handler("notify",
|
|
|
self.args)['result'][0], 0)
|
|
|
|
|
@@ -1911,7 +1928,7 @@ class TestXfrin(unittest.TestCase):
|
|
|
# This is actually NOT the address given in the command, which
|
|
|
# would at this point not make sense, see the TODO in
|
|
|
# xfrin.py.in Xfrin.command_handler())
|
|
|
- self.assertEqual(TEST_MASTER_IPV4_ADDRESS,
|
|
|
+ self.assertEqual(TEST_MASTER_IPV6_ADDRESS,
|
|
|
self.xfr.xfrin_started_master_addr)
|
|
|
self.assertEqual(int(TEST_MASTER_PORT),
|
|
|
self.xfr.xfrin_started_master_port)
|