[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.6-1-356-g5718585
James Turnbull
james at lovedthanlost.net
Fri Jan 23 14:20:46 UTC 2009
The following commit has been merged in the master branch:
commit 3ae7eca3928d5dd9d0c93e61ceedc38f60573eb5
Author: Luke Kanies <luke at madstop.com>
Date: Thu Aug 7 17:52:26 2008 -0700
Fixing an ldap connectivity test
Signed-off-by: Luke Kanies <luke at madstop.com>
diff --git a/spec/unit/indirector/ldap.rb b/spec/unit/indirector/ldap.rb
index 52abd41..2c4060c 100755
--- a/spec/unit/indirector/ldap.rb
+++ b/spec/unit/indirector/ldap.rb
@@ -113,15 +113,25 @@ describe Puppet::Indirector::Ldap do
describe "when connecting to ldap" do
confine "LDAP is not available" => Puppet.features.ldap?
+ it "should create and start a Util::Ldap::Connection instance" do
+ conn = mock 'connection', :connection => "myconn", :start => nil
+ Puppet::Util::Ldap::Connection.expects(:instance).returns conn
+
+ @searcher.connection.should == "myconn"
+ end
+
it "should only create the ldap connection when asked for it the first time" do
- @searcher.connection.should equal(@searcher.connection)
+ conn = mock 'connection', :connection => "myconn", :start => nil
+ Puppet::Util::Ldap::Connection.expects(:instance).returns conn
+
+ @searcher.connection
end
- it "should create and start a Util::Ldap::Connection instance" do
+ it "should cache the connection" do
conn = mock 'connection', :connection => "myconn", :start => nil
Puppet::Util::Ldap::Connection.expects(:instance).returns conn
- @searcher.connection.should == "myconn"
+ @searcher.connection.should equal(@searcher.connection)
end
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list