From: Peter van Dijk Date: Thu, 18 Jul 2019 18:36:10 +0000 (+0200) Subject: make test-schema exit(1) on failure; catch setNotified exception X-Git-Tag: dnsdist-1.4.0-rc1~23^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F8097%2Fhead;p=thirdparty%2Fpdns.git make test-schema exit(1) on failure; catch setNotified exception --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index c421219b70..69adc32fad 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 "<