mirror of
https://github.com/duncs/clusterssh.git
synced 2025-04-21 09:09:06 +00:00
Fix tests
This commit is contained in:
parent
b93a99ef93
commit
5ea730aff9
2 changed files with 7 additions and 5 deletions
|
@ -75,7 +75,7 @@ sub get_external_clusters {
|
|||
croak(
|
||||
App::ClusterSSH::Exception::Cluster->throw(
|
||||
error => $self->loc(
|
||||
"External command exited failed.\nCommand: [_1]\nReturn Code: [_2]",
|
||||
"External command failure.\nCommand: [_1]\nReturn Code: [_2]",
|
||||
$command,
|
||||
$return_code,
|
||||
),
|
||||
|
@ -213,6 +213,10 @@ Create a new object. Object should be common across all invocations.
|
|||
Read in /etc/clusters, $HOME/.clusterssh/clusters and any other given
|
||||
file name and register the tags found.
|
||||
|
||||
=item @resolved_tags=get_external_clusters($path_to_binary, @tags)
|
||||
|
||||
Define and use an external script to resolve tags into hostnames.
|
||||
|
||||
=item $cluster->get_tag_entries($filename);
|
||||
|
||||
Read in /etc/tags, $HOME/.clusterssh/tags and any other given
|
||||
|
|
|
@ -125,8 +125,7 @@ trap {
|
|||
@external_expected = $cluster1->get_external_clusters(
|
||||
"$Bin/external_cluster_command -x $redirect");
|
||||
};
|
||||
is( $trap->die,
|
||||
'External command exited with non-zero status: 5',
|
||||
like( $trap->die, qr/External command failure.*external_cluster_command.*Return Code: 5/ms,
|
||||
'External command: caught exception message'
|
||||
);
|
||||
is( $trap->stdout, '', 'External command: no stdout from perl code' );
|
||||
|
@ -136,8 +135,7 @@ trap {
|
|||
@external_expected = $cluster1->get_external_clusters(
|
||||
"$Bin/external_cluster_command -q $redirect");
|
||||
};
|
||||
is( $trap->die,
|
||||
'External command exited with non-zero status: 255',
|
||||
like( $trap->die, qr/External command failure.*external_cluster_command.*Return Code: 255/ms,
|
||||
'External command: caught exception message'
|
||||
);
|
||||
is( $trap->stdout, '', 'External command: no stdout from perl code' );
|
||||
|
|
Loading…
Add table
Reference in a new issue