Commit f58ac8ad authored by Evan Hunt's avatar Evan Hunt
Browse files

migrate t_db to lib/dns/tests/db_test

parent 8ecf69ef
...@@ -4,7 +4,6 @@ headerdep_test.sh ...@@ -4,7 +4,6 @@ headerdep_test.sh
nxtify nxtify
sdig sdig
*_test *_test
t_db
gsstest gsstest
t_dst t_dst
conf.sh conf.sh
......
...@@ -32,7 +32,7 @@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ ...@@ -32,7 +32,7 @@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
LIBS = @LIBS@ LIBS = @LIBS@
SUBDIR = db dst system @PKCS11_TOOLS@ optional SUBDIR = dst system @PKCS11_TOOLS@ optional
TESTDIRS = system TESTDIRS = system
......
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
@BIND9_MAKE_INCLUDES@
CINCLUDES = ${TEST_INCLUDES} ${DNS_INCLUDES} \
${ISC_INCLUDES} @DST_OPENSSL_INC@
CDEFINES = @CRYPTO@
CWARNINGS =
DNSLIBS = ../../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCLIBS = ../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCCFGLIBS = ../../../lib/isccfg/libisccfg.@A@
DNSDEPLIBS = ../../../lib/dns/libdns.@A@
ISCDEPLIBS = ../../../lib/isc/libisc.@A@
ISCCFGDEPLIBS = ../../../lib/isccfg/libisccfg.@A@
DEPLIBS = ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS}
LIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@
TLIB = ../../../lib/tests/libt_api.@A@
SRCS = t_db.c
TARGETS = t_db@EXEEXT@
@BIND9_MAKE_RULES@
t_db@EXEEXT@: t_db.@O@ ${DEPLIBS} ${TLIB}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ t_db.@O@ ${TLIB} ${LIBS}
test: t_db@EXEEXT@
-@./t_db@EXEEXT@ -c @top_srcdir@/t_config -b @srcdir@ -a
testhelp:
@./t_db -h
clean distclean::
rm -f ${TARGETS}
#
# test data for dns_db_class
#
# format:
# filename class
#
#
dns_db_class_1.data in
# dns_db_class_1.data any
$TTL 1000
@ in soa localhost. postmaster.localhost. (
1993050801 ;serial
3600 ;refresh
1800 ;retry
604800 ;expiration
3600 ) ;minimum
a in ns ns.vix.com.
a in ns ns2.vix.com.
a in ns ns3.vix.com.
b in a 1.2.3.4
#
# test data for dns_db_closeversion test 1
#
# format:
# filename type origin class cache new_name new_type existing_name existing_type
#
dns_db_closeversion_1.data rbt vix.com. in zone a.b.c.vix.com. A a.vix.com. NS
$TTL 1000
@ in soa localhost. postmaster.localhost. (
1993050801 ;serial
3600 ;refresh
1800 ;retry
604800 ;expiration
3600 ) ;minimum
a in ns ns.vix.com.
a in ns ns2.vix.com.
a in ns ns3.vix.com.
b in a 1.2.3.4
#
# test data for dns_db_closeversion test 2
#
# format:
# filename type origin class cache new_name new_type existing_name existing_type
#
dns_db_closeversion_1.data rbt vix.com. in zone a.b.c.vix.com. A a.vix.com. NS
$TTL 1000
@ in soa localhost. postmaster.localhost. (
1993050801 ;serial
3600 ;refresh
1800 ;retry
604800 ;expiration
3600 ) ;minimum
a.b.c.vix.com. a 1.2.3.4
a in ns ns2.vix.com.
a in ns ns3.vix.com.
b in a 1.2.3.4
#
# test data for dns_db_currentversion
#
# format:
# filename findname findtype
#
dns_db_currentversion.data rbt vix.com. IN zone a.b.c.vix.com. A
$TTL 1000
@ in soa localhost. postmaster.localhost. (
1993050801 ;serial
3600 ;refresh
1800 ;retry
604800 ;expiration
3600 ) ;minimum
a in ns ns.vix.com.
a in ns ns2.vix.com.
a in ns ns3.vix.com.
b in a 1.2.3.4
#
# test data for dns_db_expirenode
#
# format:
# filename type origin class existing_name existing_type
#
dns_db_expirenode.data rbt vix.com. in a.vix.com. 10000 0 ISC_R_NOTFOUND
$TTL 1000
@ in soa localhost. postmaster.localhost. (
1993050801 ;serial
3600 ;refresh
1800 ;retry
604800 ;expiration
3600 ) ;minimum
a in ns ns.vix.com.
a in ns ns2.vix.com.
a in ns ns3.vix.com.
b in a 1.2.3.4
a.b.c in ns b
$TTL 1000
@ in soa localhost. postmaster.localhost. (
1993050801 ;serial
3600 ;refresh
1800 ;retry
604800 ;expiration
3600 ) ;minimum
a.b.c in NS ns1.vix.com.
a.b.c in A 1.2.3.4
#
# test data for dns_db_find expiration time handling
#
# format:
# dbfile dbtype dborigin dbclass dbcache findname findtype findopts findtime expected_results
#
dns_db_find_10.data rbt vix.com. in cache a.b.c.vix.com. NS 0 1010 ISC_R_NOTFOUND
dns_db_find_10.data rbt vix.com. in cache a.b.c.vix.com. NS 0 0 ISC_R_SUCCESS
#
# test data for dns_db_find best match
#
# format:
# dbfile dbtype dborigin dbclass dbcache findname findtype findopts findtime expected_results
#
dns_db_find_1.data rbt vix.com. in zone a.b.c.vix.com. NS DNS_DB_GLUEOK 0 DNS_R_DELEGATION
$TTL 1000
@ in soa localhost. postmaster.localhost. (
1993050801 ;serial
3600 ;refresh
1800 ;retry
604800 ;expiration
3600 ) ;minimum
fx in ns a.fx.vix.com.
a.fx in a 1.2.3.4
#
# test data for dns_db_find DNS_R_GLUE
#
# format:
# dbfile dbtype dborigin dbclass dbcache findname findtype findopts findtime expected_results
#
dns_db_find_2.data rbt vix.com. in zone a.fx.vix.com. A DNS_DBFIND_GLUEOK 0 DNS_R_GLUE
dns_db_find_2.data rbt vix.com. in zone fx.vix.com. NS DNS_DBFIND_GLUEOK 0 DNS_R_GLUE
dns_db_find_2.data rbt vix.com. in zone a.fx.vix.com. NS DNS_DBFIND_GLUEOK 0 DNS_R_DELEGATION
$TTL 1000
@ in soa localhost. postmaster.localhost. (
1993050801 ;serial
3600 ;refresh
1800 ;retry
604800 ;expiration
3600 ) ;minimum
a.b.c in ns b
a.a.b.c in a 10.0.0.1
b in a 10.0.0.2
#
# test data for dns_db_find DNS_R_DELAGATION
#
# format:
# dbfile dbtype dborigin dbclass dbcache findname findtype findopts findtime expected_results
#
dns_db_find_3.data rbt vix.com. in zone a.b.c.vix.com. NS DNS_DB_GLUEOK 0 DNS_R_DELEGATION
dns_db_find_3.data rbt vix.com. in zone a.a.b.c.vix.com. NS DNS_DB_GLUEOK 0 DNS_R_DELEGATION
dns_db_find_3.data rbt vix.com. in zone a.a.b.c.vix.com. A DNS_DB_GLUEOK 0 DNS_R_DELEGATION
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment