Skip to content

Commit

Permalink
fixed tests when there are no testing nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed Aug 16, 2019
1 parent c739c9d commit 0deaa9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion t/kvm/n10_nodes.t
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ SKIP: {
$vm = undef;
} else {
$node = remote_node($vm_name);
$node = test_node($vm_name, $node);
$node = test_node($vm_name, $node) if $node;
$vm = undef if !$node;
}

Expand Down
12 changes: 8 additions & 4 deletions t/nodes/60_hardware.t
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,18 @@ for my $vm_name ( 'Void', 'KVM') {
$vm = undef;
}

diag($msg) if !$vm;
skip($msg,10) if !$vm;

diag("Testing remote node in $vm_name");
my ($node1,$node2) = remote_node_2($vm_name);

ok($node2,"Expecting at least 2 nodes configured to test") or next;
if ( !$node2 ) {
$msg = "Expecting at least 2 nodes configured to test";
$vm = undef;
}
diag($msg) if !$vm;
skip($msg,10) if !$vm;


diag("Testing remote node in $vm_name");
clean_remote_node($node1);
clean_remote_node($node2) if $node2;

Expand Down

0 comments on commit 0deaa9d

Please sign in to comment.