Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

small details

Signed-off-by: Alexei Znamensky <russoz@cpan.org>
  • Loading branch information...
commit 0ecb36280bd128ae949b6aafde306772374a4b5c 1 parent 4ec0095
@russoz authored
View
9 t/01-load-handler.t
@@ -1,9 +0,0 @@
-use Test::More tests => 1;
-
-BEGIN {
- use_ok('Net::LDAP::SimpleServer::ProtocolHandler');
-}
-
-diag(
-"Testing Net::LDAP::SimpleServer::ProtocolHandler $Net::LDAP::SimpleServer::ProtocolHandler::VERSION"
-);
View
9 t/01-load-store.t
@@ -1,9 +0,0 @@
-use Test::More tests => 1;
-
-BEGIN {
- use_ok('Net::LDAP::SimpleServer::LDIFStore');
-}
-
-diag(
-"Testing Net::LDAP::SimpleServer::LDIFStore $Net::LDAP::SimpleServer::LDIFStore::VERSION"
-);
View
2  t/03-param.t
@@ -27,7 +27,6 @@ sub _eval_param {
# work with Net::Server, thus we pass them in run()
my $s = Net::LDAP::SimpleServer->new();
- diag('Starting Net::LDAP::SimpleServer [Fork]');
$s->run(@a);
};
@@ -45,7 +44,6 @@ sub _eval_param {
diag('Testing the constructor params for SimpleServer');
-# ===========================================================================
# expect failure
ok( !_eval_param() );
ok( !_eval_param( {} ) );
View
28 t/04-bind.t
@@ -15,8 +15,6 @@ use constant TESTROOTPW => 'testpw';
#sub diag { print STDERR @_; }
sub ldapconnect {
-
- #diag( 'Connecting to server ' . TESTHOST . ':' . TESTPORT );
return Net::LDAP->new( TESTHOST, port => TESTPORT );
}
@@ -24,48 +22,38 @@ sub run_test {
my $mesg = undef;
my $ldap = ldapconnect();
-
- #print STDERR 'ldap :: ' . Dumper($ldap);
ok($ldap);
diag('Performing an anonymous bind');
$mesg = $ldap->bind;
- diag( $mesg->error_desc ) if $mesg->code;
- ok( !$mesg->code );
+ ok( !$mesg->code, $mesg->error_desc );
$mesg = $ldap->unbind;
- diag( $mesg->error_desc ) if $mesg->code;
- ok( !$mesg->code );
+ ok( !$mesg->code, $mesg->error_desc );
diag('Performing an authenticated bind');
$ldap = ldapconnect();
$mesg = $ldap->bind( TESTROOTDN, password => TESTROOTPW );
- diag( $mesg->error_desc ) if $mesg->code;
- ok( !$mesg->code );
+ ok( !$mesg->code, $mesg->error_desc );
$mesg = $ldap->unbind;
- diag( $mesg->error_desc ) if $mesg->code;
- ok( !$mesg->code );
+ ok( !$mesg->code, $mesg->error_desc );
diag('Performing an authenticated bind, upper case DN');
$ldap = ldapconnect();
$mesg = $ldap->bind( uc(TESTROOTDN), password => TESTROOTPW );
- diag( $mesg->error_desc ) if $mesg->code;
- ok( !$mesg->code );
+ ok( !$mesg->code, $mesg->error_desc );
$mesg = $ldap->unbind;
- diag( $mesg->error_desc ) if $mesg->code;
- ok( !$mesg->code );
+ ok( !$mesg->code, $mesg->error_desc );
diag('Performing an authenticated bind with wrong password');
$ldap = ldapconnect();
$mesg = $ldap->bind( TESTROOTDN, password => 'some-wrong-password' );
- diag( $mesg->error_desc ) if $mesg->code;
- ok( $mesg->code );
+ ok( $mesg->code, $mesg->error_desc );
$mesg = $ldap->unbind;
- diag( $mesg->error_desc ) if $mesg->code;
- ok( !$mesg->code );
+ ok( !$mesg->code, $mesg->error_desc );
}
Please sign in to comment.
Something went wrong with that request. Please try again.