Fix tests

This commit is contained in:
Xavier 2019-07-13 09:41:13 +02:00
parent b7c8d30b3f
commit 1fbfbc5c21
1 changed files with 4 additions and 1 deletions

View File

@ -55,6 +55,7 @@ C<LLNG::Manager::Test::_post()> call I<(see below)>.
use strict;
use Data::Dumper;
use File::Find;
use LWP::UserAgent;
use URI::Escape;
use Lemonldap::NG::Common::FormEncode;
@ -74,7 +75,8 @@ $Data::Dumper::Useperl = 1;
my $ini;
use File::Temp 'tempfile', 'tempdir';
our $tmpDir = $LLNG::TMPDIR || tempdir( 'tmpSessionXXXXX', DIR => 't/sessions', CLEANUP => 1 );
our $tmpDir = $LLNG::TMPDIR
|| tempdir( 'tmpSessionXXXXX', DIR => 't/sessions', CLEANUP => 1 );
mkdir "$tmpDir/lock";
mkdir "$tmpDir/saml";
mkdir "$tmpDir/saml/lock";
@ -113,6 +115,7 @@ Clean sessions created during tests
=cut
sub clean_sessions {
find( sub { unlink if -f }, $tmpDir );
foreach my $dir (qw(t/sessions/lock t/sessions/saml/lock t/sessions/saml)) {
if ( -d $dir ) {
opendir D, $dir or die $!;