From 773ccfe7188f41257538fc6fa3b7b48d7d0ece7d Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Tue, 12 Jan 2016 21:00:09 +0000 Subject: [PATCH] Avoid some warnings --- lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm | 2 +- lemonldap-ng-handler/t/10-Lemonldap-NG-Handler-SharedConf.t | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm index dc7cc9e65..e66fd0c74 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm @@ -99,7 +99,7 @@ sub unserialize { $conf->{$k} = ( $v =~ /./ ? eval { from_json($v) } : {} ); if ($@) { $Lemonldap::NG::Common::Conf::msg .= - "Unable to decode $k, probably old format. Trying... ($@)"; + "Unable to decode $k, switching to old format.\n"; return $self->oldUnserialize($fields); } } diff --git a/lemonldap-ng-handler/t/10-Lemonldap-NG-Handler-SharedConf.t b/lemonldap-ng-handler/t/10-Lemonldap-NG-Handler-SharedConf.t index 51d7a004e..ca3ac9302 100644 --- a/lemonldap-ng-handler/t/10-Lemonldap-NG-Handler-SharedConf.t +++ b/lemonldap-ng-handler/t/10-Lemonldap-NG-Handler-SharedConf.t @@ -49,6 +49,7 @@ $LLNG_DEFAULTCONFFILE = $ini->filename; # 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. +$Lemonldap::NG::Handler::API::logLevel = 'error'; use_ok('Lemonldap::NG::Handler'); if ( $numTests == 3 ) { @@ -62,7 +63,7 @@ if ( $numTests == 3 ) { my $ret; $mock->fake_module( 'Lemonldap::NG::Handler::API', - newRequest => sub { print STDERR "newRequest\n" }, + newRequest => sub { 1 }, header_in => sub { "" }, hostname => sub { 'test.example.com' }, is_initial_req => sub { '1' },