summaryrefslogtreecommitdiff
path: root/spec/integration/transaction_spec.rb
diff options
context:
space:
mode:
authorStig Sandbeck Mathisen <ssm@debian.org>2014-09-07 10:14:36 +0200
committerStig Sandbeck Mathisen <ssm@debian.org>2014-09-07 10:14:36 +0200
commitd4b83be375ac1dead058e091191ee7c7b7c24c8a (patch)
treedc825687392ae3068de5b764be60c53122d9e02a /spec/integration/transaction_spec.rb
parent229cbb976fe0f70f5f30548b83517b415840f9bb (diff)
parent1681684857c6e39d60d87b0b3520d8783977ceff (diff)
downloadpuppet-upstream/3.7.0.tar.gz
Imported Upstream version 3.7.0upstream/3.7.0
Diffstat (limited to 'spec/integration/transaction_spec.rb')
-rwxr-xr-xspec/integration/transaction_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/integration/transaction_spec.rb b/spec/integration/transaction_spec.rb
index fc1fff228..35557b8f2 100755
--- a/spec/integration/transaction_spec.rb
+++ b/spec/integration/transaction_spec.rb
@@ -193,6 +193,22 @@ describe Puppet::Transaction do
Puppet::FileSystem.exist?(file2).should be_true
end
+ it "should apply no resources whatsoever if a pre_run_check fails" do
+ path = tmpfile("path")
+ file = Puppet::Type.type(:file).new(
+ :path => path,
+ :ensure => "file"
+ )
+ notify = Puppet::Type.type(:notify).new(
+ :title => "foo"
+ )
+ notify.expects(:pre_run_check).raises(Puppet::Error, "fail for testing")
+
+ catalog = mk_catalog(file, notify)
+ catalog.apply
+ Puppet::FileSystem.exist?(path).should_not be_true
+ end
+
it "should not let one failed refresh result in other refreshes failing" do
path = tmpfile("path")
newfile = tmpfile("file")