From 173865bd7595aff40310ca97301c3015730835b0 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Wed, 8 Jul 2020 15:36:45 -0400 Subject: [PATCH] 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). --- t/write_cache.pl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/t/write_cache.pl b/t/write_cache.pl index 70aab5e..b92fd15 100644 --- a/t/write_cache.pl +++ b/t/write_cache.pl @@ -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) {