--- a/t/10-dnsvi.t Wed Jan 21 21:20:20 2015 +0100
+++ b/t/10-dnsvi.t Wed Jan 21 21:50:27 2015 +0100
@@ -83,6 +83,16 @@
AAAA => 0,
MX => 2,
},
+ 'frey-1' => {
+ RRSETS => 5,
+ SOA => { 'example.com.' => ['p.example.com. hostmaster.example.com. 47 3600 900 604800 300'] },
+ A => { 'p.example.com.' => ['1.1.1.1'] },
+ NS => { 'example.com.' => ['p.example.com.'] },
+ CNAME => {
+ 'proxy.mm.frey.example.com.' => ['uxa.frey.example.com.'],
+ 'portal.mm.frey.example.com.'=> ['uxb.frey.example.com.'],
+ },
+ },
);
# uniq list of rrtypes we want to test
@@ -98,21 +108,15 @@
subtest "sample $file" => sub {
my %expect = %{ $expect{$sample} };
my @zone = parse(slurp $file);
-# diag Dumper \@zone;
is @zone, $expect{RRSETS} => "$sample: $expect{RRSETS} RRSETS";
foreach my $type (@sets) {
-# diag '----------->' . $type;
if (ref $expect{$type} eq ref[]) {
my @entries = sort map { $_->{label} } grep { $_->{rrtype} eq $type } map { $_->{rrset} } @zone;
is_deeply \@entries, $expect{$type} => 'list of labels';
}
elsif (ref $expect{$type} eq ref{}) {
-# use Data::Dumper;
foreach my $label (keys %{ $expect{$type} }) {
- #diag Dumper $expect{$type}{$label};
- #diag Dumper $expect{$type};
my @entries = sort map { $_->{data} } grep { $_->{label} eq $label and $_->{rrtype} eq $type } map { $_->{rrset} } @zone;
-# diag Dumper \@entries;
is_deeply \@entries, $expect{$type}{$label} => 'complete rrsets',
}
}