Skip to content

Commit

Permalink
Update unit tests and unit tests data
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreenx committed Nov 21, 2024
1 parent 71c7a92 commit ea9860a
Show file tree
Hide file tree
Showing 13 changed files with 639 additions and 603 deletions.
226 changes: 109 additions & 117 deletions t/Test-dnssec.data

Large diffs are not rendered by default.

89 changes: 46 additions & 43 deletions t/Test-dnssec05-A.data

Large diffs are not rendered by default.

87 changes: 45 additions & 42 deletions t/Test-dnssec05-B.data

Large diffs are not rendered by default.

85 changes: 44 additions & 41 deletions t/Test-dnssec05-C.data

Large diffs are not rendered by default.

85 changes: 44 additions & 41 deletions t/Test-dnssec05-D.data

Large diffs are not rendered by default.

85 changes: 44 additions & 41 deletions t/Test-dnssec05-E.data

Large diffs are not rendered by default.

85 changes: 44 additions & 41 deletions t/Test-dnssec05-F.data

Large diffs are not rendered by default.

87 changes: 45 additions & 42 deletions t/Test-dnssec05-G.data

Large diffs are not rendered by default.

85 changes: 44 additions & 41 deletions t/Test-dnssec05-H.data

Large diffs are not rendered by default.

85 changes: 44 additions & 41 deletions t/Test-dnssec05-I.data

Large diffs are not rendered by default.

85 changes: 44 additions & 41 deletions t/Test-dnssec05-J.data

Large diffs are not rendered by default.

146 changes: 80 additions & 66 deletions t/zone.data

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions t/zone.t
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ my $root = Zonemaster::Engine->zone( '.' );
is( $root->parent, $root );

isa_ok( $zone->glue_names, 'ARRAY' );
is_deeply( $zone->glue_names, [qw(i.ns.se ns.nic.se ns3.nic.se)] );
is_deeply( $zone->glue_names, [qw(nsa.dnsnode.net nsp.dnsnode.net nsu.dnsnode.net)] );

isa_ok( $zone->glue, 'ARRAY' );
ok( @{ $zone->glue } > 0, 'glue list not empty' );
isa_ok( $_, 'Zonemaster::Engine::Nameserver' ) for @{ $zone->glue };

isa_ok( $zone->ns_names, 'ARRAY' );
is_deeply( $zone->ns_names, [qw(i.ns.se ns.nic.se ns3.nic.se)] );
is_deeply( $zone->ns_names, [qw(nsa.dnsnode.net nsp.dnsnode.net nsu.dnsnode.net)] );
isa_ok( $zone->ns, 'ARRAY' );
ok( @{ $zone->ns } > 0, 'NS list not empty' );
isa_ok( $_, 'Zonemaster::Engine::Nameserver' ) for @{ $zone->ns };
Expand All @@ -45,7 +45,7 @@ my $p = $zone->query_one( 'www.iis.se', 'A' );
isa_ok( $p, 'Zonemaster::Engine::Packet' );
my @rrs = $p->get_records( 'a', 'answer' );
is( scalar( @rrs ), 1, 'one answer A RR' );
is( $rrs[0]->address, '91.226.37.214', 'expected address' );
is( $rrs[0]->address, '159.253.30.207', 'expected address' );
Zonemaster::Engine::Profile->effective->set( q{net.ipv4}, 0 );
Zonemaster::Engine::Profile->effective->set( q{net.ipv6}, 0 );
Zonemaster::Engine->logger->clear_history();
Expand Down Expand Up @@ -93,21 +93,21 @@ $p = $zone->query_persistent( 'www.iis.se', 'A' );
isa_ok( $p, 'Zonemaster::Engine::Packet' );
@rrs = $p->get_records( 'a', 'answer' );
is( scalar( @rrs ), 1, 'one answer A RR' );
is( $rrs[0]->address, '91.226.37.214', 'expected address' );
is( $rrs[0]->address, '159.253.30.207', 'expected address' );

$p = $zone->query_auth( 'www.iis.se', 'A' );
isa_ok( $p, 'Zonemaster::Engine::Packet' );
@rrs = $p->get_records( 'a', 'answer' );
is( scalar( @rrs ), 1, 'one answer A RR' );
is( $rrs[0]->address, '91.226.37.214', 'expected address' );
is( $rrs[0]->address, '159.253.30.207', 'expected address' );

my $ary = $zone->query_all( 'www.iis.se', 'A' );
isa_ok( $ary, 'ARRAY' );
foreach my $p ( @$ary ) {
isa_ok( $p, 'Zonemaster::Engine::Packet' );
my @rrs = $p->get_records( 'a', 'answer' );
is( scalar( @rrs ), 1, 'one answer A RR' );
is( $rrs[0]->address, '91.226.37.214', 'expected address' );
is( $rrs[0]->address, '159.253.30.207', 'expected address' );
}

$ary = $zone->query_all( 'www.iis.se', 'A', { dnssec => 1 } );
Expand Down

0 comments on commit ea9860a

Please sign in to comment.