summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-03-09 12:55:03 -0800
committerNick Lewis <nick@puppetlabs.com>2011-03-09 12:55:03 -0800
commit3489412a03fec009bc42222f449077e6f14998a4 (patch)
tree150d8cf61ea26caf00cd4add5934d83fd1b70027 /spec
parente8763415627cf41cefece00bf4dbc48e9be81d1d (diff)
downloadpuppet-3489412a03fec009bc42222f449077e6f14998a4.tar.gz
puppet-3489412a03fec009bc42222f449077e6f14998a4.tar.xz
puppet-3489412a03fec009bc42222f449077e6f14998a4.zip
maint: Rename InventoryHost to InventoryNode
This had been conflating hosts and nodes, when nodes is the most accurate.
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/indirector/facts/inventory_active_record_spec.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/unit/indirector/facts/inventory_active_record_spec.rb b/spec/unit/indirector/facts/inventory_active_record_spec.rb
index 69d614023..ca16606b2 100644
--- a/spec/unit/indirector/facts/inventory_active_record_spec.rb
+++ b/spec/unit/indirector/facts/inventory_active_record_spec.rb
@@ -32,23 +32,23 @@ describe "Puppet::Node::Facts::InventoryActiveRecord", :if => (Puppet.features.r
end
describe "#save" do
- it "should use an existing host if possible" do
- host = Puppet::Rails::InventoryHost.new(:name => "foo", :timestamp => Time.now)
- host.save
+ it "should use an existing node if possible" do
+ node = Puppet::Rails::InventoryNode.new(:name => "foo", :timestamp => Time.now)
+ node.save
Puppet::Node::Facts.new("foo", "uptime_days" => "60", "kernel" => "Darwin").save
- Puppet::Rails::InventoryHost.count.should == 1
- Puppet::Rails::InventoryHost.first.should == host
+ Puppet::Rails::InventoryNode.count.should == 1
+ Puppet::Rails::InventoryNode.first.should == node
end
- it "should create a new host if one can't be found" do
- # This test isn't valid if there are hosts to begin with
- Puppet::Rails::InventoryHost.count.should == 0
+ it "should create a new node if one can't be found" do
+ # This test isn't valid if there are nodes to begin with
+ Puppet::Rails::InventoryNode.count.should == 0
Puppet::Node::Facts.new("foo", "uptime_days" => "60", "kernel" => "Darwin").save
- Puppet::Rails::InventoryHost.count.should == 1
- Puppet::Rails::InventoryHost.first.name.should == "foo"
+ Puppet::Rails::InventoryNode.count.should == 1
+ Puppet::Rails::InventoryNode.first.name.should == "foo"
end
it "should save the facts" do
@@ -57,7 +57,7 @@ describe "Puppet::Node::Facts::InventoryActiveRecord", :if => (Puppet.features.r
Puppet::Rails::InventoryFact.all.map{|f| [f.name,f.value]}.should =~ [["uptime_days","60"],["kernel","Darwin"]]
end
- it "should remove the previous facts for an existing host" do
+ it "should remove the previous facts for an existing node" do
Puppet::Node::Facts.new("foo", "uptime_days" => "30", "kernel" => "Darwin").save
bar_facts = Puppet::Node::Facts.new("bar", "uptime_days" => "35", "kernel" => "Linux")
foo_facts = Puppet::Node::Facts.new("foo", "uptime_days" => "60", "is_virtual" => "false")
@@ -81,12 +81,12 @@ describe "Puppet::Node::Facts::InventoryActiveRecord", :if => (Puppet.features.r
@bar_facts.save
end
- it "should identify facts by host name" do
+ it "should identify facts by node name" do
Puppet::Node::Facts.find("foo").should == @foo_facts
end
- it "should return nil if no host instance can be found" do
- Puppet::Node::Facts.find("non-existent host").should == nil
+ it "should return nil if no node instance can be found" do
+ Puppet::Node::Facts.find("non-existent node").should == nil
end
it "should convert all single-member arrays into non-arrays" do