def test_doesnt_send_message_for_nic_unlink_non_authorative_domain(self):
yield deferToDatabase(register_system_triggers)
domain = yield deferToDatabase(
self.create_domain, {'authoritative': False})
node = yield deferToDatabase(
self.create_node, {'domain': domain})
interface = yield deferToDatabase(
self.create_interface, {'node': node})
subnet = yield deferToDatabase(self.create_subnet)
sip = yield deferToDatabase(self.create_staticipaddress, {
"interface": interface,
"subnet": subnet,
})
yield self.capturePublication()
dv = DeferredValue()
listener = self.make_listener_without_delay()
listener.register(
"sys_dns", lambda *args: dv.set(args))
yield listener.startService()
try:
yield deferToDatabase(self.delete_staticipaddress, sip.id)
with ExpectedException(CancelledError):
yield dv.get(timeout=1)
finally:
yield listener.stopService()
评论列表
文章目录