LEMONLDAP::NG : little bug correction in configuration syntax control (Closes: #307044) and more tests in Manager

This commit is contained in:
Xavier Guimard 2007-05-15 18:06:24 +00:00
parent 3b70838704
commit 660252a004
6 changed files with 24 additions and 9 deletions

View File

@ -3,9 +3,8 @@ lemonldap-ng (0.8.2.1) unstable; urgency=low
* More documentation * More documentation
* Virtual host names control * Virtual host names control
* Portal can now use more than one LDAP server * Portal can now use more than one LDAP server
* Bug in DBI.pm
-- Xavier Guimard <x.guimard@free.fr> Tue, 15 May 2007 06:19:23 +0200 -- Xavier Guimard <x.guimard@free.fr> Mon, 14 May 2007 07:14:10 +0200
lemonldap-ng (0.8.2) unstable; urgency=low lemonldap-ng (0.8.2) unstable; urgency=low

View File

@ -1,5 +1,8 @@
Revision history for Perl extension Lemonldap::NG::Manager. Revision history for Perl extension Lemonldap::NG::Manager.
0.66 Tue May 15 19:53:40 2007
- Little bug correction: '-' is authorized in domain names
0.65 Sun May 6 16:15:49 2007 0.65 Sun May 6 16:15:49 2007
- SOAP: HTTP basic authentication and little bug correction in 'sessions' - SOAP: HTTP basic authentication and little bug correction in 'sessions'
mode mode

View File

@ -16,7 +16,7 @@ use MIME::Base64;
our @ISA = qw(Lemonldap::NG::Manager::Base); our @ISA = qw(Lemonldap::NG::Manager::Base);
our $VERSION = '0.65'; our $VERSION = '0.66';
sub new { sub new {
my ( $class, $args ) = @_; my ( $class, $args ) = @_;
@ -408,7 +408,7 @@ sub checkConf {
# Check cookie name # Check cookie name
return 0 unless( $config->{cookieName} =~ /^\w+$/ ); return 0 unless( $config->{cookieName} =~ /^\w+$/ );
# Check domain name # Check domain name
return 0 unless( $config->{domain} =~ /^[\w\.]+$/ ); return 0 unless( $config->{domain} =~ /^\w[\w\.\-]*\w$/ );
# Load variables # Load variables
foreach(keys %{ $config->{exportedVars} }) { foreach(keys %{ $config->{exportedVars} }) {
# Reserved words # Reserved words

View File

@ -18,7 +18,7 @@ our ( $username, $password ) = ( '', '' );
sub prereq { sub prereq {
my $self = shift; my $self = shift;
unless ( $self->{proxy} ) { unless ( $self->{proxy} ) {
print STDERR 'No SOAP parameters found (proxy and uri)'; print STDERR 'No SOAP parameters found (proxy)';
return 0; return 0;
} }
1; 1;

View File

@ -5,7 +5,7 @@
# change 'tests => 1' to 'tests => last_test_to_print'; # change 'tests => 1' to 'tests => last_test_to_print';
use Test::More tests => 2; use Test::More tests => 3;
BEGIN { use_ok('Lemonldap::NG::Manager::Conf') } BEGIN { use_ok('Lemonldap::NG::Manager::Conf') }
######################### #########################
@ -24,3 +24,5 @@ ok(
} }
) )
); );
ok( $h->can( 'dbh' ) );

View File

@ -5,7 +5,7 @@
# change 'tests => 1' to 'tests => last_test_to_print'; # change 'tests => 1' to 'tests => last_test_to_print';
use Test::More tests => 1; use Test::More tests => 4;
# SOAP::Lite is not required, so Lemonldap::NG::Manager::Conf::SOAP may # SOAP::Lite is not required, so Lemonldap::NG::Manager::Conf::SOAP may
# not run. # not run.
@ -13,9 +13,20 @@ SKIP: {
eval { require SOAP::Lite }; eval { require SOAP::Lite };
skip skip
"SOAP::Lite is not installed, so SOAP configuration access will not work", "SOAP::Lite is not installed, so SOAP configuration access will not work",
1 4
if ($@); if ($@);
use_ok('Lemonldap::NG::Manager::Conf::SOAP'); use_ok('Lemonldap::NG::Manager::Conf');
my $h;
ok(
$h = new Lemonldap::NG::Manager::Conf(
{
type => 'SOAP',
proxy => 'http://localhost',
}
)
);
ok( $h->can( '_connect' ) );
ok( $h->can( '_soapCall' ) );
} }
######################### #########################