diff options
| author | Luke Kanies <luke@madstop.com> | 2009-05-24 15:26:44 -0500 |
|---|---|---|
| committer | James Turnbull <james@ubuntu904.lovedthanlost.net> | 2009-05-26 13:43:40 +1000 |
| commit | f98d49f2d20ed52cd33504c5d0ef97d0edf9107f (patch) | |
| tree | d61ed717ec0ca84776dceaf5205ed3788fdf81d4 /spec | |
| parent | d860a2fb71858706ff318cfcdc0ff387840eef80 (diff) | |
| download | puppet-f98d49f2d20ed52cd33504c5d0ef97d0edf9107f.tar.gz puppet-f98d49f2d20ed52cd33504c5d0ef97d0edf9107f.tar.xz puppet-f98d49f2d20ed52cd33504c5d0ef97d0edf9107f.zip | |
Fixing #2253 - pluginsync failures propagate correctly
This keeps the destination directory from getting
purged if the remote source is invalid.
This mostly just removes an optimization that worked
fine when we queried the server for every directory,
but doesn't work now that we do one big query.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/integration/transaction.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/integration/transaction.rb b/spec/integration/transaction.rb new file mode 100755 index 000000000..17aba0df8 --- /dev/null +++ b/spec/integration/transaction.rb @@ -0,0 +1,25 @@ +#!/usr/bin/env ruby + +require File.dirname(__FILE__) + '/../spec_helper' + +require 'puppet/transaction' + +describe Puppet::Transaction do + it "should not apply generated resources if the parent resource fails" do + catalog = Puppet::Resource::Catalog.new + resource = Puppet::Type.type(:file).new :path => "/foo/bar" + catalog.add_resource resource + + child_resource = Puppet::Type.type(:file).new :path => "/foo/bar/baz" + + resource.expects(:eval_generate).returns([child_resource]) + + transaction = Puppet::Transaction.new(catalog) + + resource.expects(:evaluate).raises "this is a failure" + + child_resource.expects(:evaluate).never + + transaction.evaluate + end +end |
