diff options
| author | Luke Kanies <luke@madstop.com> | 2009-02-13 22:11:42 -0600 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-02-14 22:42:51 +1100 |
| commit | 487b9b1a3e8b9207a9910bc5eaeeb75cb3e4abe5 (patch) | |
| tree | ece8350ccecab37ef135529443e142a60259e618 /spec/unit/node.rb | |
| parent | 610c838146c03921455a15a7a93148748ff909a6 (diff) | |
| download | puppet-487b9b1a3e8b9207a9910bc5eaeeb75cb3e4abe5.tar.gz puppet-487b9b1a3e8b9207a9910bc5eaeeb75cb3e4abe5.tar.xz puppet-487b9b1a3e8b9207a9910bc5eaeeb75cb3e4abe5.zip | |
Failure to find node facts is now a failure.
It was previously just a warning, but the node
is essentially non-functional without the facts,
so it makes more sense for it to be a warning.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/node.rb')
| -rwxr-xr-x | spec/unit/node.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/node.rb b/spec/unit/node.rb index 25dad8c67..99c53e008 100755 --- a/spec/unit/node.rb +++ b/spec/unit/node.rb @@ -76,6 +76,11 @@ describe Puppet::Node, "when merging facts" do Puppet::Node::Facts.stubs(:find).with(@node.name).returns(Puppet::Node::Facts.new(@node.name, "one" => "c", "two" => "b")) end + it "should fail intelligently if it cannot find facts" do + Puppet::Node::Facts.expects(:find).with(@node.name).raises "foo" + lambda { @node.fact_merge }.should raise_error(Puppet::Error) + end + it "should prefer parameters already set on the node over facts from the node" do @node.parameters = {"one" => "a"} @node.fact_merge |
