|
require 't/test.pm' ;
BEGIN { use_ok( 'Lemonldap::NG::Handler::Main' ) }
use lib dirname( abs_path $0 ); my $h ;
$h = 'Lemonldap::NG::Handler::Test' ;
$ENV {SERVER_NAME} = "test1.example.com" ;
my $conf = {
cfgNum => 1,
logLevel => 'error' ,
globalStorage => 'Apache::Session::File' ,
post => {},
key => 1,
locationRules => {
'test1.example.com' => {
'default' => 'accept' ,
'^/no' => 'deny' ,
'test' => '$groups =~ /\badmin\b/' ,
'^/a/a' => 'deny' ,
'^/a' => 'accept' ,
'(?#1 first)^/b/a' => 'deny' ,
'(?#2 second)^/b' => 'accept' ,
},
},
};
eval { $h ->localConfig( $conf ); $h ->logLevelInit() };
ok( !$@, 'init' );
ok( $h ->configReload( $conf ), 'Load conf' );
|