mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 00:30:00 -04:00
Remove LDMB checks from system tests
Now that LMDB is required, there is no need to check if the feature is enabled in the system tests.
This commit is contained in:
parent
81dca80877
commit
46e98295bb
4 changed files with 31 additions and 109 deletions
|
|
@ -67,13 +67,11 @@ n=$((n + 1))
|
|||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
if $FEATURETEST --with-lmdb; then
|
||||
echo_i "checking that existing NZF file was renamed after migration ($n)"
|
||||
[ -e ns2/3bf305731dd26307.nzf~ ] || ret=1
|
||||
n=$((n + 1))
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
fi
|
||||
echo_i "checking that existing NZF file was renamed after migration ($n)"
|
||||
[ -e ns2/3bf305731dd26307.nzf~ ] || ret=1
|
||||
n=$((n + 1))
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
echo_i "adding new zone ($n)"
|
||||
ret=0
|
||||
|
|
@ -146,16 +144,6 @@ n=$((n + 1))
|
|||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
if ! $FEATURETEST --with-lmdb; then
|
||||
echo_i "verifying no comments in NZF file ($n)"
|
||||
ret=0
|
||||
hcount=$(grep "^# New zone file for view: _default" ns2/3bf305731dd26307.nzf | wc -l)
|
||||
[ $hcount -eq 0 ] || ret=1
|
||||
n=$((n + 1))
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
fi
|
||||
|
||||
echo_i "checking rndc showzone with previously added zone ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.2 showzone previous.example >rndc.out.ns2.$n
|
||||
|
|
@ -165,13 +153,11 @@ n=$((n + 1))
|
|||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
if $FEATURETEST --with-lmdb; then
|
||||
echo_i "checking zone is present in NZD ($n)"
|
||||
ret=0
|
||||
$NZD2NZF ns2/_default.nzd | grep previous.example >/dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
fi
|
||||
echo_i "checking zone is present in NZD ($n)"
|
||||
ret=0
|
||||
$NZD2NZF ns2/_default.nzd | grep previous.example >/dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
echo_i "deleting previously added zone ($n)"
|
||||
ret=0
|
||||
|
|
@ -191,22 +177,10 @@ check_nzd2nzf() (
|
|||
&& ! grep previous.example nzd2nzf.out.$n >/dev/null
|
||||
)
|
||||
|
||||
if $FEATURETEST --with-lmdb; then
|
||||
echo_i "checking zone was deleted from NZD ($n)"
|
||||
retry_quiet 10 check_nzd2nzf || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
fi
|
||||
|
||||
if ! $FEATURETEST --with-lmdb; then
|
||||
echo_i "checking NZF file now has comment ($n)"
|
||||
ret=0
|
||||
hcount=$(grep "^# New zone file for view: _default" ns2/3bf305731dd26307.nzf | wc -l)
|
||||
[ $hcount -eq 1 ] || ret=1
|
||||
n=$((n + 1))
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
fi
|
||||
echo_i "checking zone was deleted from NZD ($n)"
|
||||
retry_quiet 10 check_nzd2nzf || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
echo_i "deleting newly added zone added.example ($n)"
|
||||
ret=0
|
||||
|
|
@ -526,24 +500,12 @@ n=$((n + 1))
|
|||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
if ! $FEATURETEST --with-lmdb; then
|
||||
echo_i "checking new NZF file has comment ($n)"
|
||||
ret=0
|
||||
hcount=$(grep "^# New zone file for view: external" ns2/external.nzf | wc -l)
|
||||
[ $hcount -eq 1 ] || ret=1
|
||||
n=$((n + 1))
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
fi
|
||||
|
||||
if $FEATURETEST --with-lmdb; then
|
||||
echo_i "verifying added.example in external view created an external.nzd DB ($n)"
|
||||
ret=0
|
||||
[ -e ns2/external.nzd ] || ret=1
|
||||
n=$((n + 1))
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
fi
|
||||
echo_i "verifying added.example in external view created an external.nzd DB ($n)"
|
||||
ret=0
|
||||
[ -e ns2/external.nzd ] || ret=1
|
||||
n=$((n + 1))
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
echo_i "checking rndc reload causes named to reload the external view's new zone config ($n)"
|
||||
ret=0
|
||||
|
|
@ -562,11 +524,7 @@ status=$((status + ret))
|
|||
|
||||
echo_i "checking rndc showzone with newly added zone ($n)"
|
||||
_check_rndc_showzone_newly_added() (
|
||||
if ! $FEATURETEST --with-lmdb; then
|
||||
expected='zone "added.example" in external { type primary; file "added.db"; };'
|
||||
else
|
||||
expected='zone "added.example" { type primary; file "added.db"; };'
|
||||
fi
|
||||
expected='zone "added.example" { type primary; file "added.db"; };'
|
||||
$RNDCCMD 10.53.0.2 showzone added.example in external >rndc.out.ns2.$n 2>/dev/null \
|
||||
&& [ "$(cat rndc.out.ns2.$n)" = "$expected" ]
|
||||
)
|
||||
|
|
@ -668,13 +626,8 @@ n=$((n + 1))
|
|||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
if $FEATURETEST --with-lmdb; then
|
||||
echo_i "checking NZD file was created in new-zones-directory ($n)"
|
||||
expect=ns2/new-zones/directory.nzd
|
||||
else
|
||||
echo_i "checking NZF file was created in new-zones-directory ($n)"
|
||||
expect=ns2/new-zones/directory.nzf
|
||||
fi
|
||||
echo_i "checking NZD file was created in new-zones-directory ($n)"
|
||||
expect=ns2/new-zones/directory.nzd
|
||||
$RNDCCMD 10.53.0.2 sync 'added.example IN directory' 2>&1 | sed 's/^/I:ns2 /'
|
||||
sleep 2
|
||||
[ -e "$expect" ] || ret=1
|
||||
|
|
@ -710,19 +663,6 @@ n=$((n + 1))
|
|||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
|
||||
if ! $FEATURETEST --with-lmdb; then
|
||||
echo_i "check that addzone is fully reversed on failure (--with-lmdb=no) ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.3 addzone "test1.baz" '{ type primary; file "e.db"; };' >/dev/null 2>&1 || ret=1
|
||||
$RNDCCMD 10.53.0.3 addzone "test2.baz" '{ type primary; file "dne.db"; };' >/dev/null 2>&1 && ret=1
|
||||
$RNDCCMD 10.53.0.3 addzone "test3.baz" '{ type primary; file "e.db"; };' >/dev/null 2>&1 || ret=1
|
||||
$RNDCCMD 10.53.0.3 delzone "test3.baz" >/dev/null 2>&1 || ret=1
|
||||
grep test2.baz ns3/_default.nzf >/dev/null && ret=1
|
||||
n=$((n + 1))
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=$((status + ret))
|
||||
fi
|
||||
|
||||
_check_version_bind() (
|
||||
$DIG $DIGOPTS @10.53.0.3 version.bind txt ch >dig.out.test$n \
|
||||
&& grep "status: NOERROR" dig.out.test$n >/dev/null
|
||||
|
|
|
|||
|
|
@ -109,26 +109,14 @@ for lmdb in lmdb-*.conf; do
|
|||
n=$((n + 1))
|
||||
ret=0
|
||||
|
||||
if $FEATURETEST --with-lmdb; then
|
||||
echo_i "checking that named-checkconf detects no error in $lmdb ($n)"
|
||||
{
|
||||
$CHECKCONF $lmdb >checkconf.out$n 2>&1
|
||||
rc=$?
|
||||
} || true
|
||||
if [ $rc -ne 0 ]; then
|
||||
echo_i "failed"
|
||||
ret=1
|
||||
fi
|
||||
else
|
||||
echo_i "checking that named-checkconf detects error in $lmdb ($n)"
|
||||
{
|
||||
$CHECKCONF $lmdb >checkconf.out$n 2>&1
|
||||
rc=$?
|
||||
} || true
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo_i "failed"
|
||||
ret=1
|
||||
fi
|
||||
echo_i "checking that named-checkconf detects no error in $lmdb ($n)"
|
||||
{
|
||||
$CHECKCONF $lmdb >checkconf.out$n 2>&1
|
||||
rc=$?
|
||||
} || true
|
||||
if [ $rc -ne 0 ]; then
|
||||
echo_i "failed"
|
||||
ret=1
|
||||
fi
|
||||
status=$((status + ret))
|
||||
done
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ usage(void) {
|
|||
fprintf(stderr, "\t--rsasha1\n");
|
||||
fprintf(stderr, "\t--tsan\n");
|
||||
fprintf(stderr, "\t--with-libidn2\n");
|
||||
fprintf(stderr, "\t--with-lmdb\n");
|
||||
fprintf(stderr, "\t--with-libnghttp2\n");
|
||||
fprintf(stderr, "\t--with-zlib\n");
|
||||
}
|
||||
|
|
@ -221,10 +220,6 @@ main(int argc, char **argv) {
|
|||
#endif /* ifdef HAVE_LIBIDN2 */
|
||||
}
|
||||
|
||||
if (strcmp(argv[1], "--with-lmdb") == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcmp(argv[1], "--with-libnghttp2") == 0) {
|
||||
#ifdef HAVE_LIBNGHTTP2
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ FEATURES = {
|
|||
"LIBIDN2": "--with-libidn2",
|
||||
"LIBNGHTTP2": "--with-libnghttp2",
|
||||
"LIBXML2": "--have-libxml2",
|
||||
"LMDB": "--with-lmdb",
|
||||
"MD5": "--md5",
|
||||
"QUERYTRACE": "--enable-querytrace",
|
||||
"RSASHA1": "--rsasha1",
|
||||
|
|
|
|||
Loading…
Reference in a new issue