diff options
| author | Luke Kanies <luke@madstop.com> | 2008-07-01 22:20:26 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-07-01 22:22:07 -0500 |
| commit | c1e010fb7dfe4666b3db3d958627f70f7325cf85 (patch) | |
| tree | 7fb80de6764b6d0e7111b51a9270e40a48c2f05f /spec/integration | |
| parent | 4d22a95b571991eb47046c3b0103b2e733b2801d (diff) | |
Fixing the Node::Ldap.search method to use an indirection request.
I foolishly was just using the old-style api.
Added an integration test to catch this in the future.
Diffstat (limited to 'spec/integration')
| -rwxr-xr-x | spec/integration/indirector/node/ldap.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/integration/indirector/node/ldap.rb b/spec/integration/indirector/node/ldap.rb new file mode 100755 index 000000000..34f4cb159 --- /dev/null +++ b/spec/integration/indirector/node/ldap.rb @@ -0,0 +1,22 @@ +#!/usr/bin/env ruby + +require File.dirname(__FILE__) + '/../../../spec_helper' + +require 'puppet/indirector/node/ldap' + +describe Puppet::Node::Ldap do + before do + Puppet[:node_terminus] = :ldap + Puppet::Node.stubs(:terminus_class).returns :ldap + end + + after do + Puppet.settings.clear + end + + it "should use a restrictive filter when searching for nodes in a class" do + Puppet::Node.indirection.terminus(:ldap).expects(:ldapsearch).with("(&(objectclass=puppetClient)(puppetclass=foo))") + + Puppet::Node.search "eh", :class => "foo" + end +end |
