summaryrefslogtreecommitdiffstats
path: root/spec/unit/indirector/node/ldap.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-09-20 15:24:20 -0500
committerLuke Kanies <luke@madstop.com>2007-09-20 15:24:20 -0500
commit8212f88ce3ad2ddbc7e1e713111d9478171c42b8 (patch)
tree5c61cfd3ca2b76d9ab093feeee89c351796667e0 /spec/unit/indirector/node/ldap.rb
parent4cde0344b50084b897792ba4cdd1f62a733d7f53 (diff)
downloadpuppet-8212f88ce3ad2ddbc7e1e713111d9478171c42b8.tar.gz
puppet-8212f88ce3ad2ddbc7e1e713111d9478171c42b8.tar.xz
puppet-8212f88ce3ad2ddbc7e1e713111d9478171c42b8.zip
Fixing all existing spec tests so that they now
pass given the redesign that Rick implemented. This was mostly a question of fixing the method names and the mocks.
Diffstat (limited to 'spec/unit/indirector/node/ldap.rb')
-rwxr-xr-xspec/unit/indirector/node/ldap.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/unit/indirector/node/ldap.rb b/spec/unit/indirector/node/ldap.rb
index c6eb45ffc..e4b0cd7d4 100755
--- a/spec/unit/indirector/node/ldap.rb
+++ b/spec/unit/indirector/node/ldap.rb
@@ -20,33 +20,33 @@ describe Puppet::Indirector.terminus(:node, :ldap), " when searching for nodes"
end
it "should return nil for hosts that cannot be found" do
- @searcher.get("foo").should be_nil
+ @searcher.find("foo").should be_nil
end
it "should return Puppet::Node instances" do
@nodetable["foo"] = [nil, %w{}, {}]
- @searcher.get("foo").should be_instance_of(Puppet::Node)
+ @searcher.find("foo").should be_instance_of(Puppet::Node)
end
it "should set the node name" do
@nodetable["foo"] = [nil, %w{}, {}]
- @searcher.get("foo").name.should == "foo"
+ @searcher.find("foo").name.should == "foo"
end
it "should set the classes" do
@nodetable["foo"] = [nil, %w{one two}, {}]
- @searcher.get("foo").classes.should == %w{one two}
+ @searcher.find("foo").classes.should == %w{one two}
end
it "should set the parameters" do
@nodetable["foo"] = [nil, %w{}, {"one" => "two"}]
- @searcher.get("foo").parameters.should == {"one" => "two"}
+ @searcher.find("foo").parameters.should == {"one" => "two"}
end
it "should set classes and parameters from the parent node" do
@nodetable["foo"] = ["middle", %w{one two}, {"one" => "two"}]
@nodetable["middle"] = [nil, %w{three four}, {"three" => "four"}]
- node = @searcher.get("foo")
+ node = @searcher.find("foo")
node.classes.sort.should == %w{one two three four}.sort
node.parameters.should == {"one" => "two", "three" => "four"}
end
@@ -54,14 +54,14 @@ describe Puppet::Indirector.terminus(:node, :ldap), " when searching for nodes"
it "should prefer child parameters to parent parameters" do
@nodetable["foo"] = ["middle", %w{}, {"one" => "two"}]
@nodetable["middle"] = [nil, %w{}, {"one" => "four"}]
- @searcher.get("foo").parameters["one"].should == "two"
+ @searcher.find("foo").parameters["one"].should == "two"
end
it "should recurse indefinitely through parent relationships" do
@nodetable["foo"] = ["middle", %w{one two}, {"one" => "two"}]
@nodetable["middle"] = ["top", %w{three four}, {"three" => "four"}]
@nodetable["top"] = [nil, %w{five six}, {"five" => "six"}]
- node = @searcher.get("foo")
+ node = @searcher.find("foo")
node.parameters.should == {"one" => "two", "three" => "four", "five" => "six"}
node.classes.sort.should == %w{one two three four five six}.sort
end