Index: trunk/t/DNSTest.pm
===================================================================
--- trunk/t/DNSTest.pm	(revision 971)
+++ trunk/t/DNSTest.pm	(revision 985)
@@ -56,18 +56,22 @@
   ## Prepare the DB
   # Check that we aren't in an obviously production DB before blowing it away.
-  # A DB instantiated for these tests should NEVER have more than a handful of domains and maybe 20-30 records.
+  # A DB instantiated for these tests should have a known set of domains and records.
 
   $dbh = $dnsdb->{dbh};
 
-  my ($dcount) = $dbh->selectrow_array("SELECT count(*) FROM domains");
-  BAIL_OUT("# DB looks like it may not be a test DB, found $dcount > 10 domains!\n")
-	if $dcount > 10;
-  cmp_ok( $dcount, '<=', 10, "domain count ($dcount): looks like a test DB" );
+  my ($dcount) = $dbh->selectrow_array("SELECT count(*) FROM domains WHERE NOT domain IN ".
+	"('example.com','example.net','example.org','expiry1.test','expiry2.test')");
+  BAIL_OUT("# DB looks like it may not be a test DB, found $dcount > 0 non-test domains!\n")
+	if $dcount > 0;
+  cmp_ok( $dcount, '==', 0, "non-test domain count ($dcount): looks like a test DB" );
 
-  my ($rcount) = $dbh->selectrow_array("SELECT count(*) FROM records");
-  my $maxrecs = 60;
+  my ($rcount) = $dbh->selectrow_array(qq{SELECT count(*) FROM records WHERE NOT (
+	host like '%example.com' or host like '%example.net' or host like '%example.org' or
+	host like '%expiry1.test' or host like '%expiry2.test' or inetlazy(val) << '192.168.2.0/27'
+	)});
+  my $maxrecs = 0;
   BAIL_OUT("# DB looks like it may not be a test DB, found $rcount > $maxrecs records!\n")
         if $rcount > $maxrecs;
-  cmp_ok( $rcount, '<=', $maxrecs, "record ($rcount): looks like a test DB" );
+  cmp_ok( $rcount, '<=', $maxrecs, "non-test record ($rcount): looks like a test DB" );
 
   # drop all tables etc
