Commit 2b3e4a61 authored by Thomas Sibley's avatar Thomas Sibley
Browse files

Explicitly create the base DN we use in tests

Net::LDAP::Server::Test 0.16 requires that the base DN exist or it
throws an "Object not found" LDAP error.  Tests now pass under this
version.
parent 60058f98
......@@ -17,6 +17,7 @@ ok( my $server = Net::LDAP::Server::Test->new( $ldap_port, auto_schema => 1 ),
"spawned test LDAP server on port $ldap_port");
my $ldap = Net::LDAP->new("localhost:$ldap_port");
$ldap->bind();
$ldap->add("dc=bestpractical,dc=com");
my @ldap_user_entries;
for ( 1 .. 12 ) {
......
......@@ -33,6 +33,8 @@ ok( my $server = Net::LDAP::Server::Test->new( $ldap_port, auto_schema => 1 ),
my $ldap = Net::LDAP->new("localhost:$ldap_port");
$ldap->bind();
$ldap->add("ou=foo,dc=bestpractical,dc=com");
my @ldap_entries;
for ( 0 .. 12 ) {
my $username = "testuser$_";
......
......@@ -18,6 +18,8 @@ ok( my $server = Net::LDAP::Server::Test->new( $ldap_port, auto_schema => 1 ),
my $ldap = Net::LDAP->new("localhost:$ldap_port");
$ldap->bind();
$ldap->add("ou=foo,dc=bestpractical,dc=com");
my @ldap_entries;
for ( 1 .. 13 ) {
my $username = "testuser$_";
......
......@@ -18,6 +18,8 @@ ok( my $server = Net::LDAP::Server::Test->new( $ldap_port, auto_schema => 1 ),
my $ldap = Net::LDAP->new("localhost:$ldap_port");
$ldap->bind();
$ldap->add("ou=foo,dc=bestpractical,dc=com");
my @ldap_entries;
for ( 1 .. 13 ) {
my $username = "testuser$_";
......
Supports Markdown
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