Mark perms test as TODO

This test appears to be inconsistent and needs further investigation to
work out why
This commit is contained in:
Duncan Ferguson 2020-04-21 08:29:12 +01:00
parent 4674b20fb9
commit 208889e36d
2 changed files with 18 additions and 15 deletions

View file

@ -5,6 +5,7 @@ Revision history for {{$dist->name}}
- Add in 'command_pre' and 'command_post' configuration options
- Fix 'Add Host' menu error finding 'resolved_names'
- Ensure lib path is added to range tests to find the libraries
- Mark permission test as TODO as it appears to be inconsistent
4.14 2019-08-21 Duncan Ferguson <duncan_ferguson@user.sf.net>
- Include README within the repository, not just created tar.gz files

View file

@ -84,21 +84,23 @@ 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,
"Unable to read file $no_read: Permission denied",
'Error on reading an existing file ok'
);
}
else {
pass('Cannot test for lack of read access when run as root');
TODO: {
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,
"Unable to read file $no_read: Permission denied",
'Error on reading an existing file ok'
);
}
else {
pass('Cannot test for lack of read access when run as root');
}
}
$expected{tag1} = ['host1'];