Commit dc637c29 authored by Xavier Guimard's avatar Xavier Guimard

Test more clean

parent 18bc8856
......@@ -76,7 +76,7 @@ install: build
$(CURDIR)/debian/tmp$(LMVARDIR)manager/jquery.js \
debian/tmp/examples/manager/jquery.js
perl -i -pe 's#(["'"'"'])[\w-\./]*jquery.js#$$1/javascript/jquery/jquery.js#' \
$(CURDIR)/debian/tmp/examples/$(LMVARDIR)manager/*.pl \
$(CURDIR)/debian/tmp/examples/manager/*.pl \
$(CURDIR)/debian/tmp$(LMSHAREDIR)portal-skins/pastel/header.tpl
# postinst provides initial portal, manager and sessions-explorer
rm -f debian/tmp/var/lib/lemonldap-ng/portal/index.pl \
......
......@@ -19,7 +19,7 @@ use strict;
use Lemonldap::NG::Handler::Simple qw(:all);
use Lemonldap::NG::Handler::Vhost;
use Lemonldap::NG::Common::Conf; #link protected lmConf
use Lemonldap::NG::Common::Conf; #link protected lmConf
use Cache::Cache qw($EXPIRES_NEVER);
use base qw(Lemonldap::NG::Handler::Vhost Lemonldap::NG::Handler::Simple);
......@@ -82,8 +82,11 @@ sub defaultValuesInit {
# @return boolean
sub localInit {
my ( $class, $args ) = @_;
die("$class : unable to build configuration : $Lemonldap::NG::Common::Conf::msg")
unless($lmConf = Lemonldap::NG::Common::Conf->new( $args->{configStorage} ));
die(
"$class : unable to build configuration : $Lemonldap::NG::Common::Conf::msg"
)
unless ( $lmConf =
Lemonldap::NG::Common::Conf->new( $args->{configStorage} ) );
# localStorage can be declared in configStorage or at the root or both
foreach (qw(localStorage localStorageOptions)) {
......@@ -126,13 +129,17 @@ sub testConf {
my ( $class, $local ) = @_;
my $conf = $lmConf->getConf( { local => $local } );
unless ( ref($conf) ) {
$class->lmLog( "$class: Unable to load configuration : $Lemonldap::NG::Common::Conf::msg", 'error' );
$class->lmLog(
"$class: Unable to load configuration : $Lemonldap::NG::Common::Conf::msg",
'error'
);
return $cfgNum ? OK : SERVER_ERROR;
}
if ( $cfgNum != $conf->{cfgNum} ) {
$class->lmLog( "$class: get configuration ($Lemonldap::NG::Common::Conf::msg)",
if ( !$cfgNum or $cfgNum != $conf->{cfgNum} ) {
$class->lmLog(
"$class: get configuration ($Lemonldap::NG::Common::Conf::msg)",
'debug' );
$lastReload = time();
$lastReload = time();
return $class->setConf($conf);
}
$class->lmLog( "$class: configuration is up to date", 'debug' );
......
......@@ -241,7 +241,7 @@ sub printXmlConf {
sub buildTree {
my $self = shift;
my $config = $self->config->getConf(@_);
$config = $self->default unless ($config);
$config = $self->default unless ( $config and $config->{cfgNum} );
my $indice = 1;
my $tree = {
id => '0',
......
......@@ -18,7 +18,7 @@ my $tmp;
my $perl = "perl -I" . join( ' -I', @INC );
$tmp =
`$perl -MLemonldap::NG::Portal::Menu -e '\$a=Lemonldap::NG::Portal::Menu->new()'`;
`$perl -MLemonldap::NG::Portal::Menu -e '\$a=Lemonldap::NG::Portal::Menu->new()' 2>/dev/null`;
ok( $tmp =~ /Portal object required/, 'Portal object required' );
my ( $m, $p );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment