From 2b172ef99afcb661978b589ddc2ebaa930aae71d Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Thu, 18 Jul 2019 20:36:10 +0200 Subject: [PATCH] make test-schema exit(1) on failure; catch setNotified exception --- pdns/pdnsutil.cc | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index c421219b7..69adc32fa 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1776,6 +1776,7 @@ void testSchema(DNSSECKeeper& dk, const DNSName& zone) cout<<"Note: test-schema will try to create the zone, but it will not remove it."<get(rrthrowaway)) // should not touch rr but don't assume anything { cout<<"Expected one record, got multiple, aborting"<setNotified(di.id, 500); db->getDomainInfo(zone, di); if(di.notified_serial != 500) { - cout<<"[-] Set serial 500, got back "<setNotified(di.id, 2147484148); + try { + db->setNotified(di.id, 2147484148); + } catch(const PDNSException &pe) { + cout<<"While setting serial, got error: "<getDomainInfo(zone, di); if(di.notified_serial != 2147484148) { - cout<<"[-] Set serial 2147484148, got back "<