Add new catz system test to check a version property with invalid type

There is already a check for the missing version property case
(catalog-bad1.example), and this new test should result in the same
outcome, but differs in a way that there exists a version record in the
zone, but it is of a wrong type (A instead of the expected TXT).

(cherry picked from commit 5bfe655835)
This commit is contained in:
Aram Sargsyan 2022-04-15 15:34:19 +00:00
parent 7dc8b2f79b
commit a8f9d4e418
5 changed files with 58 additions and 1 deletions

View file

@ -0,0 +1,14 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; SPDX-License-Identifier: MPL-2.0
;
; 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 https://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
@ 3600 SOA . . 1 86400 3600 86400 3600
@ 3600 IN NS invalid.
version IN A 10.53.0.1

View file

@ -95,6 +95,15 @@ view "default" {
notify explicit;
};
# Type A "version" property
zone "catalog-bad4.example" {
type primary;
file "catalog-bad4.example.db";
allow-transfer { any; };
allow-update { any; };
also-notify { 10.53.0.2; };
notify explicit;
};
};
view "ch" ch {

View file

@ -62,6 +62,9 @@ view "default" {
zone "catalog-bad3.example"
default-masters { 10.53.0.1; }
in-memory yes;
zone "catalog-bad4.example"
default-masters { 10.53.0.1; }
in-memory yes;
};
# A faulty dlz configuration to check if named and catz survive a certain class
@ -101,24 +104,34 @@ view "default" {
primaries { 10.53.0.1; };
};
# No "version" property
zone "catalog-bad1.example" {
type secondary;
file "catalog-bad1.example.db";
primaries { 10.53.0.1; };
};
# Unsupported "version" property
zone "catalog-bad2.example" {
type secondary;
file "catalog-bad2.example.db";
primaries { 10.53.0.1; };
};
# Two RRs in TXT RRset for the "version" property
zone "catalog-bad3.example" {
type secondary;
file "catalog-bad3.example.db";
primaries { 10.53.0.1; };
};
# Type A "version" property
zone "catalog-bad4.example" {
type secondary;
file "catalog-bad4.example.db";
primaries { 10.53.0.1; };
};
};
view "ch" ch {
@ -129,6 +142,7 @@ view "ch" ch {
in-memory yes;
};
# Non-IN class catalog zone
zone "catalog-bad5.example" ch {
type secondary;
file "catalog-bad5.example.db";

View file

@ -64,31 +64,42 @@ view "default" {
primaries { 10.53.0.1; };
};
# No "version" property
zone "catalog-bad1.example" {
type secondary;
file "catalog-bad1.example.db";
primaries { 10.53.0.1; };
};
# Unsupported "version" property
zone "catalog-bad2.example" {
type secondary;
file "catalog-bad2.example.db";
primaries { 10.53.0.1; };
};
# Two RRs in TXT RRset for the "version" property
zone "catalog-bad3.example" {
type secondary;
file "catalog-bad3.example.db";
primaries { 10.53.0.1; };
};
# Type A "version" property
zone "catalog-bad4.example" {
type secondary;
file "catalog-bad4.example.db";
primaries { 10.53.0.1; };
};
};
view "ch" ch {
# removed catalog-zone option, otherwise this is
# Removed catalog-zone option, otherwise this is
# identical to named1.conf.in
# Non-IN class catalog zone
zone "catalog-bad5.example" ch {
type secondary;
file "catalog-bad5.example.db";

View file

@ -108,6 +108,15 @@ wait_for_message ns2/named.run "catz: new catalog zone 'catalog-bad3.example' is
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "checking that catalog-bad4.example (with only spurious type A version record) has failed to load ($n)"
ret=0
wait_for_message ns2/named.run "catz: invalid record in catalog zone - version.catalog-bad4.example IN A (failure) - ignoring" &&
wait_for_message ns2/named.run "catz: zone 'catalog-bad4.example' version is not set" &&
wait_for_message ns2/named.run "catz: new catalog zone 'catalog-bad4.example' is broken and will not be processed" || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "checking that catalog-bad5.example (non-IN class) has failed to load ($n)"
ret=0