Browse Source

added new tests (incomplete) for the Sqlite3 data source

git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1151 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya 15 years ago
parent
commit
833d7f652d

+ 2 - 0
src/lib/auth/Makefile.am

@@ -15,10 +15,12 @@ run_unittests_SOURCES = run_unittests.cc
 run_unittests_SOURCES += unittest_util.h unittest_util.cc
 run_unittests_SOURCES += unittest_ds.h unittest_ds.cc
 run_unittests_SOURCES += datasrc_unittest.cc
+run_unittests_SOURCES += data_source_sqlite3_unittest.cc
 run_unittests_SOURCES += data_source_static_unittest.cc
 run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
 run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
 run_unittests_LDADD = $(GTEST_LDADD)
+run_unittests_LDADD += $(SQLITE_LIBS)
 run_unittests_LDADD += .libs/libauth.a
 run_unittests_LDADD += $(top_builddir)/src/lib/dns/.libs/libdns.a 
 run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/.libs/libexceptions.a

+ 288 - 0
src/lib/auth/data_source_sqlite3_unittest.cc

@@ -0,0 +1,288 @@
+// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+// $Id$
+
+#include <stdint.h>
+
+#include <algorithm>
+#include <string>
+#include <vector>
+
+#include <gtest/gtest.h>
+
+#include <dns/name.h>
+#include <dns/message.h>
+#include <dns/rdata.h>
+#include <dns/rrclass.h>
+#include <dns/rrtype.h>
+#include <dns/rdataclass.h>
+#include <dns/rrsetlist.h>
+
+#include "query.h"
+#include "data_source.h"
+#include "data_source_sqlite3.h"
+
+using namespace std;
+using namespace isc::dns;
+using namespace isc::dns::rdata;
+using namespace isc::auth;
+
+namespace {
+static const char* SQLITE_DBFILE_EXAMPLE = "testdata/test.sqlite3";
+
+static const string sigdata_common(" 20100322084538 20100220084538 "
+                                   "33495 example.com. FAKEFAKEFAKEFAKE");
+
+static const Name zone_name("example.com");
+static const Name nomatch_name("example.org");
+static const Name www_name("www.example.com");
+static const Name www_upper_name("WWW.EXAMPLE.COM");
+
+class Sqlite3DataSourceTest : public ::testing::Test {
+protected:
+    Sqlite3DataSourceTest() : message(Message::PARSE),
+                              query(NULL), rrclass(RRClass::IN()),
+                              rrtype(RRType::A()), rrttl(RRTTL(3600)),
+                              find_flags(0), rrset_matched(0), rrset_count(0)
+    {
+        data_source.init(SQLITE_DBFILE_EXAMPLE);
+
+        // the data source will ignore the message, and the encapsulating
+        // query object so the content doesn't matter.
+        // (it's a bad practice, but is a different issue)
+        message.addQuestion(Question(Name("example.org"), rrclass, rrtype));
+        query = new Query(message, true);
+
+        www_data.push_back("192.0.2.1");
+        www_sig_data.push_back("A 5 3 3600" + sigdata_common);
+        www_nsec_data.push_back("example.com. A RRSIG NSEC");
+        www_nsec_sig_data.push_back("NSEC 5 3 7200" + sigdata_common);
+        apex_ns_data.push_back("dns01.example.com.");
+        apex_ns_data.push_back("dns02.example.com.");
+        apex_ns_data.push_back("dns03.example.com.");
+        apex_ns_sig_data.push_back("NS 5 2 3600" + sigdata_common);
+    }
+    ~Sqlite3DataSourceTest() { delete query; }
+    Sqlite3DataSrc data_source;
+    Message message;
+    Query* query;
+    // we allow these to be modified in the test
+    RRClass rrclass;
+    RRType rrtype;
+    RRTTL rrttl;
+    RRsetList result_sets;
+    uint32_t find_flags;
+    unsigned rrset_matched;
+    unsigned rrset_count;
+
+    vector<RRType> types;
+    vector<RRTTL> ttls;
+    vector<const vector<string>* > answers;
+    vector<const vector<string>* > signatures;
+
+    vector<RRType> expected_types;
+    vector<string> www_data;
+    vector<string> www_sig_data;
+    vector<string> www_nsec_data;
+    vector<string> www_nsec_sig_data;
+    vector<string> apex_ns_data;
+    vector<string> apex_ns_sig_data;
+};
+
+void
+checkRRset(RRsetPtr rrset, const Name& expected_name,
+           const RRClass& expected_class, const RRType& expected_type,
+           const RRTTL& expected_rrttl, const vector<string>& expected_data,
+           const vector<string>* expected_sig_data)
+{
+    EXPECT_EQ(expected_name, rrset->getName());
+    EXPECT_EQ(expected_class, rrset->getClass());
+    EXPECT_EQ(expected_type, rrset->getType());
+    EXPECT_EQ(expected_rrttl, rrset->getTTL());
+
+    RdataIteratorPtr rdata_iterator = rrset->getRdataIterator();
+    rdata_iterator->first();
+    vector<string>::const_iterator data_it = expected_data.begin();
+    for (; data_it != expected_data.end(); ++data_it) {
+        EXPECT_FALSE(rdata_iterator->isLast());
+        if (rdata_iterator->isLast()) {
+            // buggy case, should stop here
+            break;
+        }
+        EXPECT_EQ(0, (rdata_iterator->getCurrent()).compare(
+                      *createRdata(expected_type, expected_class, *data_it)));
+        rdata_iterator->next();
+    }
+
+    if (expected_sig_data != NULL) {
+        RRsetPtr sig_rrset = rrset->getRRsig();
+        EXPECT_FALSE(NULL == sig_rrset);
+        // Note: we assume the TTL for RRSIG is the same as that of the
+        // RRSIG target.
+        checkRRset(sig_rrset, expected_name, expected_class, RRType::RRSIG(),
+                   expected_rrttl, *expected_sig_data, NULL);
+    } else {
+        EXPECT_TRUE(NULL == rrset->getRRsig());
+    }
+
+    EXPECT_TRUE(rdata_iterator->isLast());
+}
+
+void
+checkFind(const Sqlite3DataSrc& data_source, const Query& query,
+          const Name& expected_name, const Name* zone_name,
+          const RRClass& expected_class, const RRType& expected_type,
+          const vector<RRTTL>& expected_ttls, const uint32_t expected_flags,
+          const vector<RRType>& expected_types,
+          const vector<const vector<string>* >& expected_answers,
+          const vector<const vector<string>* >& expected_signatures)
+{
+    RRsetList result_sets;
+    uint32_t find_flags;
+    unsigned int rrset_matched = 0;
+    unsigned int rrset_count = 0;
+
+    EXPECT_EQ(DataSrc::SUCCESS,
+              data_source.findRRset(query, expected_name, expected_class,
+                                    expected_type, result_sets, find_flags,
+                                    zone_name));
+    EXPECT_EQ(expected_flags, find_flags);
+    RRsetList::iterator it = result_sets.begin();
+    for (; it != result_sets.end(); ++it) {
+        vector<RRType>::const_iterator found_type = find(expected_types.begin(), expected_types.end(),
+                          (*it)->getType());
+        // there should be a match
+        EXPECT_TRUE(found_type != expected_types.end());
+        if (found_type != expected_types.end()) {
+            unsigned int index = distance(expected_types.begin(), found_type);
+            checkRRset(*it, expected_name, expected_class, (*it)->getType(),
+                       expected_ttls[index], *expected_answers[index],
+                       expected_signatures[index]);
+            ++rrset_matched;
+        }
+        ++rrset_count;
+    }
+    EXPECT_EQ(expected_types.size(), rrset_count);
+    EXPECT_EQ(expected_types.size(), rrset_matched);
+}
+
+void
+checkFind(const Sqlite3DataSrc& data_source, const Query& query,
+          const Name& expected_name, const Name* zone_name,
+          const RRClass& expected_class, const RRType& expected_type,
+          const RRTTL& expected_rrttl, const uint32_t expected_flags,
+          const vector<string>& expected_data,
+          const vector<string>* expected_sig_data)
+{
+    vector<RRType> types;
+    vector<RRTTL> ttls;
+    vector<const vector<string>* > answers;
+    vector<const vector<string>* > signatures;
+
+    types.push_back(expected_type);
+    ttls.push_back(expected_rrttl);
+    answers.push_back(&expected_data);
+    signatures.push_back(expected_sig_data);
+
+    checkFind(data_source, query, expected_name, zone_name, expected_class,
+              expected_type, ttls, expected_flags, types, answers,
+              signatures);
+}
+
+TEST_F(Sqlite3DataSourceTest, close) {
+    EXPECT_EQ(DataSrc::SUCCESS, data_source.close());
+}
+
+TEST_F(Sqlite3DataSourceTest, findClosestEnclosure) {
+    NameMatch name_match(www_name);
+    data_source.findClosestEnclosure(name_match);
+    EXPECT_EQ(zone_name, *name_match.closestName());
+    EXPECT_EQ(&data_source, name_match.bestDataSrc());
+}
+
+TEST_F(Sqlite3DataSourceTest, findClosestEnclosureNoMatch) {
+    NameMatch name_match(nomatch_name);
+    data_source.findClosestEnclosure(name_match);
+    EXPECT_EQ(NULL, name_match.closestName());
+    EXPECT_EQ(NULL, name_match.bestDataSrc());
+}
+
+TEST_F(Sqlite3DataSourceTest, findRRsetNormal) {
+    // Without specifying the zone name, and then with the zone name
+    checkFind(data_source, *query, www_name, NULL, rrclass, rrtype, rrttl, 0,
+              www_data, &www_sig_data);
+
+    checkFind(data_source, *query, www_name, &zone_name, rrclass, rrtype, rrttl,
+              0, www_data, &www_sig_data);
+
+    // With a zone name that doesn't match
+    EXPECT_EQ(DataSrc::SUCCESS,
+              data_source.findRRset(*query, www_name, rrclass, rrtype,
+                                    result_sets, find_flags, &nomatch_name));
+    EXPECT_EQ(DataSrc::NO_SUCH_ZONE, find_flags);
+    EXPECT_TRUE(result_sets.begin() == result_sets.end()); // should be empty
+}
+
+TEST_F(Sqlite3DataSourceTest, findRRsetNormalANY) {
+    types.push_back(RRType::A());
+    types.push_back(RRType::NSEC());
+    ttls.push_back(RRTTL(3600));
+    ttls.push_back(RRTTL(7200));
+    answers.push_back(&www_data);
+    answers.push_back(&www_nsec_data);
+    signatures.push_back(&www_sig_data);
+    signatures.push_back(&www_nsec_sig_data);
+
+    rrtype = RRType::ANY();
+    checkFind(data_source, *query, www_name, NULL, rrclass, rrtype, ttls, 0,
+              types, answers, signatures);
+
+    checkFind(data_source, *query, www_name, &zone_name, rrclass, rrtype, ttls,
+              0, types, answers, signatures);
+}
+
+// Case insensitive lookup
+#if 0                           // this currently fails
+TEST_F(Sqlite3DataSourceTest, findRRsetNormalCase) {
+    checkFind(data_source, *query, www_upper_name, NULL, rrclass, rrtype, rrttl,
+              0, www_data, &www_sig_data);
+
+    checkFind(data_source, *query, www_upper_name, &zone_name, rrclass, rrtype,
+              rrttl, 0, www_data, &www_sig_data);
+
+    EXPECT_EQ(DataSrc::SUCCESS,
+              data_source.findRRset(*query, www_upper_name, rrclass, rrtype,
+                                    result_sets, find_flags, &nomatch_name));
+    EXPECT_EQ(DataSrc::NO_SUCH_ZONE, find_flags);
+    EXPECT_TRUE(result_sets.begin() == result_sets.end()); // should be empty
+}
+#endif
+
+TEST_F(Sqlite3DataSourceTest, findRRsetApexNS) {
+    rrtype = RRType::NS();
+    checkFind(data_source, *query, zone_name, NULL, rrclass, rrtype, rrttl,
+              DataSrc::REFERRAL, apex_ns_data, &apex_ns_sig_data);
+
+    checkFind(data_source, *query, zone_name, &zone_name, rrclass, rrtype,
+              rrttl, DataSrc::REFERRAL, apex_ns_data, &apex_ns_sig_data);
+
+    EXPECT_EQ(DataSrc::SUCCESS,
+              data_source.findRRset(*query, zone_name, rrclass, rrtype,
+                                    result_sets, find_flags, &nomatch_name));
+    EXPECT_EQ(DataSrc::NO_SUCH_ZONE, find_flags);
+    EXPECT_TRUE(result_sets.begin() == result_sets.end()); // should be empty
+}
+
+}

+ 169 - 0
src/lib/auth/testdata/example.com.signed

@@ -0,0 +1,169 @@
+; File written on Sat Feb 20 01:45:38 2010
+; dnssec_signzone version 9.7.0
+example.com.		3600	IN SOA	master.example.com. admin.example.com. (
+					1234       ; serial
+					3600       ; refresh (1 hour)
+					1800       ; retry (30 minutes)
+					2419200    ; expire (4 weeks)
+					7200       ; minimum (2 hours)
+					)
+			3600	RRSIG	SOA 5 2 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+;; RRs with different TTLs.  The highest one should be used
+			1200	NS	dns01.example.com.
+			3600	NS	dns02.example.com.
+			1800	NS	dns03.example.com.
+			3600	RRSIG	NS 5 2 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			3600	MX	10 mail.example.com.
+			3600	MX	20 mail.subzone.example.com.
+			3600	RRSIG	MX 5 2 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	cname-ext.example.com. NS SOA MX RRSIG NSEC DNSKEY
+			7200	RRSIG	NSEC 5 2 7200 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			3600	DNSKEY	256 3 5 (
+					AwEAAcOUBllYc1hf7ND9uDy+Yz1BF3sI0m4q
+					NGV7WcTD0WEiuV7IjXgHE36fCmS9QsUxSSOV
+					o1I/FMxI2PJVqTYHkXFBS7AzLGsQYMU7UjBZ
+					SotBJ6Imt5pXMu+lEDNy8TOUzG3xm7g0qcbW
+					YF6qCEfvZoBtAqi5Rk7Mlrqs8agxYyMx
+					) ; key id = 33495
+			3600	DNSKEY	257 3 5 (
+					AwEAAe5WFbxdCPq2jZrZhlMj7oJdff3W7syJ
+					tbvzg62tRx0gkoCDoBI9DPjlOQG0UAbj+xUV
+					4HQZJStJaZ+fHU5AwVNT+bBZdtV+NujSikhd
+					THb4FYLg2b3Cx9NyJvAVukHp/91HnWuG4T36
+					CzAFrfPwsHIrBz9BsaIQ21VRkcmj7DswfI/i
+					DGd8j6bqiODyNZYQ+ZrLmF0KIJ2yPN3iO6Zq
+					23TaOrVTjB7d1a/h31ODfiHAxFHrkY3t3D5J
+					R9Nsl/7fdRmSznwtcSDgLXBoFEYmw6p86Acv
+					RyoYNcL1SXjaKVLG5jyU3UR+LcGZT5t/0xGf
+					oIK/aKwENrsjcKZZj660b1M=
+					) ; key id = 4456
+			3600	RRSIG	DNSKEY 5 2 3600 20100322084538 (
+					20100220084538 4456 example.com.
+					FAKEFAKEFAKEFAKE )
+			3600	RRSIG	DNSKEY 5 2 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+cname-ext.example.com.	3600	IN CNAME www.sql1.example.com.
+			3600	RRSIG	CNAME 5 3 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	cname-int.example.com. CNAME RRSIG NSEC
+			7200	RRSIG	NSEC 5 3 7200 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+cname-int.example.com.	3600	IN CNAME www.example.com.
+			3600	RRSIG	CNAME 5 3 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	dname.example.com. CNAME RRSIG NSEC
+			7200	RRSIG	NSEC 5 3 7200 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+dname.example.com.	3600	IN DNAME sql1.example.com.
+			3600	RRSIG	DNAME 5 3 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	dns01.example.com. DNAME RRSIG NSEC
+			7200	RRSIG	NSEC 5 3 7200 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+dns01.example.com.	3600	IN A	192.168.2.1
+			3600	RRSIG	A 5 3 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	dns02.example.com. A RRSIG NSEC
+			7200	RRSIG	NSEC 5 3 7200 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+dns02.example.com.	3600	IN A	192.168.2.2
+			3600	RRSIG	A 5 3 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	dns03.example.com. A RRSIG NSEC
+			7200	RRSIG	NSEC 5 3 7200 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+dns03.example.com.	3600	IN A	192.168.2.3
+			3600	RRSIG	A 5 3 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	foo.example.com. A RRSIG NSEC
+			7200	RRSIG	NSEC 5 3 7200 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+foo.example.com.	3600	IN CNAME cnametest.flame.org.
+			3600	RRSIG	CNAME 5 3 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	mail.example.com. CNAME RRSIG NSEC
+			7200	RRSIG	NSEC 5 3 7200 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+mail.example.com.	3600	IN A	192.168.10.10
+			3600	RRSIG	A 5 3 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	sql1.example.com. A RRSIG NSEC
+			7200	RRSIG	NSEC 5 3 7200 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+sql1.example.com.	3600	IN NS	dns01.example.com.
+			3600	IN NS	dns02.example.com.
+			3600	IN NS	dns03.example.com.
+			3600	DS	33313 5 1 (
+					FDD7A2C11AA7F55D50FBF9B7EDDA2322C541
+					A8DE )
+			3600	DS	33313 5 2 (
+					0B99B7006F496D135B01AB17EDB469B4BE9E
+					1973884DEA757BC4E3015A8C3AB3 )
+			3600	RRSIG	DS 5 3 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	subzone.example.com. NS DS RRSIG NSEC
+			7200	RRSIG	NSEC 5 3 7200 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+ns1.subzone.example.com. 3600	IN A	192.168.3.1
+ns2.subzone.example.com. 3600	IN A	192.168.3.2
+subzone.example.com.	3600	IN NS	ns1.subzone.example.com.
+			3600	IN NS	ns2.subzone.example.com.
+			3600	DS	40633 5 1 (
+					3E56C0EA92CF529E005A4B62979533350492
+					F105 )
+			3600	DS	40633 5 2 (
+					AA8D4BD330C68BFB4D785894DDCF6B689CE9
+					873C4A3801F57A5AA3FE17925B8C )
+			3600	RRSIG	DS 5 3 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	*.wild.example.com. NS DS RRSIG NSEC
+			7200	RRSIG	NSEC 5 3 7200 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+*.wild.example.com.	3600	IN A	192.168.3.2
+			3600	RRSIG	A 5 3 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	www.example.com. A RRSIG NSEC
+			7200	RRSIG	NSEC 5 3 7200 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+www.example.com.	3600	IN A	192.0.2.1
+			3600	RRSIG	A 5 3 3600 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	example.com. A RRSIG NSEC
+			7200	RRSIG	NSEC 5 3 7200 20100322084538 (
+					20100220084538 33495 example.com.
+					FAKEFAKEFAKEFAKE )
+;; This doesn't have an RRSIG.  It makes this zone "incomplete signed",
+;; but for the purpose of data source API testing it doesn't matter.
+nosig.example.com.	3600	IN A	192.0.2.1

+ 55 - 0
src/lib/auth/testdata/sql1.example.com.signed

@@ -0,0 +1,55 @@
+; File written on Sat Feb 20 01:45:36 2010
+; dnssec_signzone version 9.7.0
+sql1.example.com.	3600	IN SOA	master.example.com. admin.example.com. (
+					678        ; serial
+					3600       ; refresh (1 hour)
+					1800       ; retry (30 minutes)
+					2419200    ; expire (4 weeks)
+					7200       ; minimum (2 hours)
+					)
+			3600	RRSIG	SOA 5 3 3600 20100322084536 (
+					20100220084536 12447 sql1.example.com.
+					FAKEFAKEFAKEFAKE )
+			3600	NS	dns01.example.com.
+			3600	NS	dns02.example.com.
+			3600	NS	dns03.example.com.
+			3600	RRSIG	NS 5 3 3600 20100322084536 (
+					20100220084536 12447 sql1.example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	www.sql1.example.com. NS SOA RRSIG NSEC DNSKEY
+			7200	RRSIG	NSEC 5 3 7200 20100322084536 (
+					20100220084536 12447 sql1.example.com.
+					FAKEFAKEFAKEFAKE )
+			3600	DNSKEY	256 3 5 (
+					AwEAAdYdRhBAEY67R/8G1N5AjGF6asIiNh/p
+					NGeQ8xDQP13JN2lo+sNqWcmpYNhuVqRbLB+m
+					amsU1XcCICSBvAlSmfz/ZUdafX23knArTlAL
+					xMmspcfdpqun3Yr3YYnztuj06rV7RqmveYck
+					WvAUXVYMSMQZfJ305fs0dE/xLztL/CzZ
+					) ; key id = 12447
+			3600	DNSKEY	257 3 5 (
+					AwEAAbaKDSa9XEFTsjSYpUTHRotTS9Tz3krf
+					DucugW5UokGQKC26QlyHXlPTZkC+aRFUs/di
+					cJX2kopndLcnlNAPWiKnKtrsFSCnIJDBZIyv
+					cKq+9RXmV3HK3bUdHnQZ88IZWBRmWKfZ6wnz
+					Ho53kdYKAemTErkztaX3lRRPLYWpxRcDPEjy
+					sXT3Lh0vfL5D+CIO1yKw/q7C+v6+/kYAxc2l
+					fbNE3HpklSuF+dyX4nXxWgzbcFuLz5Bwfq6Z
+					J9RYe/kNkA0uMWNa1KkGeRh8gg22kgD/KT5h
+					PTnpezUWLvoY5Qc7IB3T0y4n2JIwiF2ZrZYV
+					rWgDjRWAzGsxJiJyjd6w2k0=
+					) ; key id = 33313
+			3600	RRSIG	DNSKEY 5 3 3600 20100322084536 (
+					20100220084536 12447 sql1.example.com.
+					FAKEFAKEFAKEFAKE )
+			3600	RRSIG	DNSKEY 5 3 3600 20100322084536 (
+					20100220084536 33313 sql1.example.com.
+					FAKEFAKEFAKEFAKE )
+www.sql1.example.com.	3600	IN A	192.168.2.2
+			3600	RRSIG	A 5 4 3600 20100322084536 (
+					20100220084536 12447 sql1.example.com.
+					FAKEFAKEFAKEFAKE )
+			7200	NSEC	sql1.example.com. A RRSIG NSEC
+			7200	RRSIG	NSEC 5 4 7200 20100322084536 (
+					20100220084536 12447 sql1.example.com.
+					FAKEFAKEFAKEFAKE )

BIN
src/lib/auth/testdata/test.sqlite3