Fix some tests after recent modifications on Handler
This commit is contained in:
parent
5ce762e9e3
commit
c4b9635c53
1
debian/liblemonldap-ng-handler-perl.examples
vendored
1
debian/liblemonldap-ng-handler-perl.examples
vendored
|
@ -1,4 +1,3 @@
|
|||
debian/tmp/examples/handler/*
|
||||
debian/tmp/etc/lemonldap-ng/handler-apache2.conf
|
||||
debian/tmp/etc/lemonldap-ng/test-apache2.conf
|
||||
debian/tmp/var/lib/lemonldap-ng/test
|
||||
|
|
9
debian/liblemonldap-ng-handler-perl.postinst
vendored
9
debian/liblemonldap-ng-handler-perl.postinst
vendored
|
@ -4,14 +4,5 @@ set -e
|
|||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
EXAMPLEHANDLERFILE=/usr/share/doc/liblemonldap-ng-handler-perl/examples/MyHandler.pm
|
||||
HANDLERFILE=/var/lib/lemonldap-ng/handler/MyHandler.pm
|
||||
SESSIONSDIR=/var/lib/lemonldap-ng/sessions
|
||||
|
||||
if [ "$1" == "configure" ]
|
||||
then
|
||||
[ -e $HANDLERFILE ] || cp $EXAMPLEHANDLERFILE $HANDLERFILE
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
exit 0
|
||||
|
|
|
@ -5,7 +5,6 @@ example/MyHandlerLog4Perl.pm
|
|||
example/scripts/purgeLocalCache
|
||||
example/scripts/purgeLocalCache.cron.d
|
||||
lib/Lemonldap/NG/Handler.pm
|
||||
lib/Lemonldap/NG/Handler/AuthBasic.pm
|
||||
lib/Lemonldap/NG/Handler/CGI.pm
|
||||
lib/Lemonldap/NG/Handler/SharedConf.pm
|
||||
lib/Lemonldap/NG/Handler/Initialization/GlobalInit.pm
|
||||
|
@ -17,16 +16,12 @@ lib/Lemonldap/NG/Handler/Main/Logger.pm
|
|||
lib/Lemonldap/NG/Handler/Main/PostForm.pm
|
||||
lib/Lemonldap/NG/Handler/Menu.pm
|
||||
lib/Lemonldap/NG/Handler/Proxy.pm
|
||||
lib/Lemonldap/NG/Handler/SecureToken.pm
|
||||
lib/Lemonldap/NG/Handler/Specific/AuthBasic.pm
|
||||
lib/Lemonldap/NG/Handler/Specific/SecureToken.pm
|
||||
lib/Lemonldap/NG/Handler/Specific/SympaAutoLogin.pm
|
||||
lib/Lemonldap/NG/Handler/Specific/UpdateCookie.pm
|
||||
lib/Lemonldap/NG/Handler/Specific/ZimbraPreAuth.pm
|
||||
lib/Lemonldap/NG/Handler/Status.pm
|
||||
lib/Lemonldap/NG/Handler/SympaAutoLogin.pm
|
||||
lib/Lemonldap/NG/Handler/UpdateCookie.pm
|
||||
lib/Lemonldap/NG/Handler/ZimbraPreAuth.pm
|
||||
Makefile.PL
|
||||
MANIFEST This list of files
|
||||
META.yml
|
||||
|
|
|
@ -4,29 +4,25 @@
|
|||
##########################
|
||||
#
|
||||
## change 'tests => 1' to 'tests => last_test_to_print';
|
||||
#no warnings;
|
||||
#use Test::More; #qw(no_plan)
|
||||
#
|
||||
#my $numTests = 2;
|
||||
#eval { require Test::MockObject }
|
||||
# or { $numTests = 1
|
||||
# and warn "Warning: Test::MockObject is needed to run deeper tests\n" };
|
||||
#
|
||||
#plan tests => $numTests;
|
||||
#
|
||||
## get a standard basic configuration in $args hashref
|
||||
#use Cwd 'abs_path';
|
||||
#use File::Basename;
|
||||
#use lib dirname( abs_path $0 );
|
||||
#
|
||||
#open STDERR, '>/dev/null';
|
||||
#
|
||||
no warnings;
|
||||
use Test::More; #qw(no_plan)
|
||||
|
||||
my $numTests = 1;
|
||||
plan tests => $numTests;
|
||||
|
||||
# get a standard basic configuration in $args hashref
|
||||
use Cwd 'abs_path';
|
||||
use File::Basename;
|
||||
use lib dirname( abs_path $0 );
|
||||
|
||||
open STDERR, '>/dev/null';
|
||||
|
||||
##########################
|
||||
#
|
||||
## 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.
|
||||
#use_ok( 'Lemonldap::NG::Handler::Main', ':all' );
|
||||
#
|
||||
use_ok( 'Lemonldap::NG::Handler::Main', ':all' );
|
||||
|
||||
#if ( $numTests == 2 ) {
|
||||
# my $h;
|
||||
# $h = bless {}, 'Lemonldap::NG::Handler::Main';
|
||||
|
|
|
@ -76,8 +76,8 @@ if ( $numTests == 3 ) {
|
|||
unescape_url => sub { return $_ },
|
||||
);
|
||||
my $ret;
|
||||
$mock->fake_module( 'Lemonldap::NG::Handler::Main::Headers',
|
||||
lmSetHeaderOut => sub { $ret = join( ':', $_[2], $_[3], ); }, );
|
||||
$mock->fake_module( 'Lemonldap::NG::Handler::API',
|
||||
set_header_out => sub { $ret = join( ':', $_[2], $_[3], ); }, );
|
||||
|
||||
our $apacheRequest = Apache2::RequestRec->new();
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@ $ini->flush();
|
|||
use Env qw(LLNG_DEFAULTCONFFILE);
|
||||
$LLNG_DEFAULTCONFFILE = $ini->filename;
|
||||
|
||||
open STDERR, '>/dev/null';
|
||||
|
||||
#########################
|
||||
|
||||
# Insert your test code below, the Test::More module is use()ed here so read
|
||||
|
@ -35,7 +37,7 @@ SKIP: {
|
|||
"Digest::HMAC_SHA1 is not installed, so Lemonldap::NG::Handler::ZimbraPreAuth will not be useable",
|
||||
1
|
||||
if ($@);
|
||||
use_ok('Lemonldap::NG::Handler::ZimbraPreAuth');
|
||||
use_ok('Lemonldap::NG::Handler::Specific::ZimbraPreAuth');
|
||||
}
|
||||
|
||||
$LLNG_DEFAULTCONFFILE = undef;
|
||||
|
|
Loading…
Reference in New Issue
Block a user