Split subtest into two subtests
This makes it easier to debug failures.
This commit is contained in:
parent
7b6f640c9b
commit
6e7a4fb460
1 changed files with 5 additions and 2 deletions
|
@ -39,7 +39,7 @@ subtest "get_ip_from_interface tests" => sub {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
subtest "Get default interface and IP for test system" => sub {
|
subtest "Get default interface and IP for test system (IPv4)" => sub {
|
||||||
my $interface = ddclient::get_default_interface(4);
|
my $interface = ddclient::get_default_interface(4);
|
||||||
if ($interface) {
|
if ($interface) {
|
||||||
isnt($interface, "lo", "Check for loopback 'lo'");
|
isnt($interface, "lo", "Check for loopback 'lo'");
|
||||||
|
@ -49,7 +49,10 @@ subtest "Get default interface and IP for test system" => sub {
|
||||||
is($ip1, $ip2, "Check IPv4 from default interface");
|
is($ip1, $ip2, "Check IPv4 from default interface");
|
||||||
ok(ddclient::is_ipv4($ip1), "Valid IPv4 from get_ip_from_interface($interface)");
|
ok(ddclient::is_ipv4($ip1), "Valid IPv4 from get_ip_from_interface($interface)");
|
||||||
}
|
}
|
||||||
$interface = ddclient::get_default_interface(6);
|
};
|
||||||
|
|
||||||
|
subtest "Get default interface and IP for test system (IPv6)" => sub {
|
||||||
|
my $interface = ddclient::get_default_interface(6);
|
||||||
if ($interface) {
|
if ($interface) {
|
||||||
isnt($interface, "lo", "Check for loopback 'lo'");
|
isnt($interface, "lo", "Check for loopback 'lo'");
|
||||||
isnt($interface, "lo0", "Check for loopback 'lo0'");
|
isnt($interface, "lo0", "Check for loopback 'lo0'");
|
||||||
|
|
Loading…
Reference in a new issue