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: auth-4.2.0-rc3~11^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e68e3d3d36a02b11b058be6756362a637246a36c;p=pdns make test-schema exit(1) on failure; catch setNotified exception (cherry picked from commit 2b172ef99afcb661978b589ddc2ebaa930aae71d) --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 0f749d9f2..e7c8dd5ed 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1775,6 +1775,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 "<