2011-03-21 18:19:00 +01:00
|
|
|
# Before `make install' is performed this script should be runnable with
|
|
|
|
# `make test'. After `make install' it should work as `perl Lemonldap-NG-Handler-Proxy.t'
|
|
|
|
|
|
|
|
#########################
|
|
|
|
|
|
|
|
# change 'tests => 1' to 'tests => last_test_to_print';
|
|
|
|
|
|
|
|
use Test::More tests => 1;
|
2014-03-31 18:25:09 +02:00
|
|
|
use Cwd 'abs_path';
|
|
|
|
use File::Basename;
|
2014-05-01 23:27:07 +02:00
|
|
|
use File::Temp;
|
2014-03-31 18:25:09 +02:00
|
|
|
|
2014-05-01 23:27:07 +02:00
|
|
|
my $ini = File::Temp->new();
|
|
|
|
my $dir = dirname( abs_path($0) );
|
|
|
|
|
|
|
|
print $ini "[all]
|
2017-02-21 12:11:23 +01:00
|
|
|
logger = Lemonldap::NG::Common::Logger::Std
|
|
|
|
logLeval = error
|
2014-05-01 23:27:07 +02:00
|
|
|
[configuration]
|
|
|
|
type=File
|
|
|
|
dirName=$dir
|
|
|
|
";
|
|
|
|
|
|
|
|
$ini->flush();
|
|
|
|
|
|
|
|
use Env qw(LLNG_DEFAULTCONFFILE);
|
2014-05-16 15:29:12 +02:00
|
|
|
$LLNG_DEFAULTCONFFILE = $ini->filename;
|
2011-03-21 18:19:00 +01:00
|
|
|
|
2014-06-27 16:12:54 +02:00
|
|
|
open STDERR, '>/dev/null';
|
|
|
|
|
2011-03-21 18:19:00 +01:00
|
|
|
#########################
|
|
|
|
|
|
|
|
# Insert your test code below, the Test::More module is use()ed here so read
|
|
|
|
# its man page ( perldoc Test::More ) for help writing this test script.
|
|
|
|
|
|
|
|
SKIP: {
|
|
|
|
eval { require Cache::Memcached };
|
|
|
|
skip
|
2016-03-17 23:19:44 +01:00
|
|
|
"Cache::Memcached is not installed, so Lemonldap::NG::Handler::SecureToken will not be useable",
|
2011-03-21 18:19:00 +01:00
|
|
|
1
|
|
|
|
if ($@);
|
2017-02-11 08:47:22 +01:00
|
|
|
use_ok('Lemonldap::NG::Handler::Lib::SecureToken');
|
2011-03-21 18:19:00 +01:00
|
|
|
}
|
|
|
|
|
2014-05-01 23:27:07 +02:00
|
|
|
$LLNG_DEFAULTCONFFILE = undef;
|