App-ClusterSSH
view release on metacpan or search on metacpan
t/30cluster.t view on Meta::CPAN
is_deeply( \%got, \%expected, 'Shared cluster object' ) or diag explain %got;
# should pass without issue
trap {
$cluster1->read_cluster_file( $Bin . '/30cluster.doesnt exist' );
};
is( !$trap, '', 'coped with missing file ok' );
isa_ok( $cluster1, 'App::ClusterSSH::Cluster' );
# no point running this test as root since root cannot be blocked
# from accessing the file
if ( $EUID != 0 ) {
my $no_read = $Bin . '/30cluster.cannot_read';
chmod 0000, $no_read;
trap {
$cluster1->read_cluster_file($no_read);
};
chmod 0644, $no_read;
isa_ok( $trap->die, 'App::ClusterSSH::Exception::LoadFile' );
is( $trap->die,
( run in 0.496 second using v1.01-cache-2.11-cpan-49f99fa48dc )