]> granicus.if.org Git - pdns/commitdiff
add notified_serial range test to pdnsutil test-schema
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 18 Jul 2019 15:35:35 +0000 (17:35 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 25 Jul 2019 11:44:56 +0000 (13:44 +0200)
pdns/pdnsutil.cc

index 8eb3f016dbd04b95d7a982c9fba8320042292a38..c421219b707ff4dc52f122f8eb577829da3a6435 100644 (file)
@@ -1868,6 +1868,20 @@ void testSchema(DNSSECKeeper& dk, const DNSName& zone)
     return;
   }
   cout<<"[+] ordername sorting is correct for names starting with _"<<endl;
+  cout<<"Setting low notified serial"<<endl;
+  db->setNotified(di.id, 500);
+  db->getDomainInfo(zone, di);
+  if(di.notified_serial != 500) {
+    cout<<"[-] Set serial 500, got back "<<di.notified_serial<<endl;
+  }
+  cout<<"Setting serial that needs 32 bits"<<endl;
+  db->setNotified(di.id, 2147484148);
+  db->getDomainInfo(zone, di);
+  if(di.notified_serial != 2147484148) {
+    cout<<"[-] Set serial 2147484148, got back "<<di.notified_serial<<endl;
+  } else {
+    cout<<"[+] Big serials work correctly"<<endl;
+  }
   cout<<endl;
   cout<<"End of tests, please remove "<<zone<<" from domains+records"<<endl;
 }