use temp COMPILE_DIR to avoid test failures
where the default COMPILE_DIR already exists and is owned by another user or not writable for some other reason by the testing user.
This commit is contained in:
1 parent
6146b1f2f5
commit
1d9ea654e9
8 files changed
+21
-9
No files matched your search
@@ -17,12 +17,12 @@ BEGIN {
|
||||
}
|
||||
}
|
||||
|
||||
use File::Temp;
|
||||
use File::Temp qw( tempdir );
|
||||
use Mojo::IOLoop;
|
||||
use Test::More;
|
||||
|
||||
# Use a clean temporary directory
|
||||
BEGIN { $ENV{MOJO_TMPDIR} ||= File::Temp::tempdir }
|
||||
BEGIN { $ENV{MOJO_TMPDIR} ||= tempdir( CLEANUP => 1) }
|
||||
|
||||
# Make sure sockets are working
|
||||
plan skip_all => 'working sockets required for this test!'
|
||||
@@ -36,7 +36,7 @@ use Mojolicious::Lite;
|
||||
use Test::Mojo;
|
||||
|
||||
# POD renderer plugin
|
||||
plugin 'tt_renderer';
|
||||
plugin 'tt_renderer' => {template_options => { COMPILE_DIR => tempdir( CLEANUP => 1 ) }};
|
||||
|
||||
# Silence
|
||||
app->log->level('error');
|
||||
@@ -57,6 +57,8 @@ $t->get_ok('/blow')->status_is(500)->content_like(qr/file error - doesnotexist\.
|
||||
|
||||
if(eval q{ use Devel::Cycle; 1 })
|
||||
{
|
||||
# ignore warnings coming from Devel::Cycle
|
||||
local $SIG{__WARN__} = sub { };
|
||||
Devel::Cycle::find_cycle(app, sub {
|
||||
my $arg = shift;
|
||||
# Template::Provider (from which M::P::T::Provider inherits) has some cycles which are freed manaully by
|
||||
|
||||
Reference in new issue
Block a user