Don't test writing to a read-only directory
root can always write to a read-only directory so the test was failing on the CI runners (which run as root).
This commit is contained in:
parent
192a00ad64
commit
173865bd75
1 changed files with 1 additions and 5 deletions
|
@ -15,10 +15,6 @@ $module->redefine('warning', sub {
|
|||
my $tmpdir = File::Temp->newdir();
|
||||
my $dir = $tmpdir->dirname();
|
||||
diag("temporary directory: $dir");
|
||||
my $ro_tmpdir = File::Temp->newdir();
|
||||
my $ro_dir = $ro_tmpdir->dirname();
|
||||
chmod(0500, $ro_dir) or BAIL_OUT($!);
|
||||
diag("temporary read-only directory: $ro_dir");
|
||||
|
||||
sub tc {
|
||||
return {
|
||||
|
@ -32,7 +28,7 @@ my @test_cases = (
|
|||
tc("create cache file", catfile($dir, 'a', 'b', 'cachefile'), undef),
|
||||
tc("overwrite cache file", catfile($dir, 'a', 'b', 'cachefile'), undef),
|
||||
tc("bad directory", catfile($dir, 'a', 'b', 'cachefile', 'bad'), qr/Failed to create/i),
|
||||
tc("read-only directory", catfile($ro_dir, 'cachefile'), qr/Failed to create/i),
|
||||
tc("bad file", catfile($dir, 'a', 'b'), qr/Failed to create/i),
|
||||
);
|
||||
|
||||
for my $tc (@test_cases) {
|
||||
|
|
Loading…
Reference in a new issue