So it turns out that we've never actually had failed pre/post commands cause
runs to fail, even though the tests appear to be testing the right thing.

      it "should fail if the command fails" do
        Puppet.settings[:prerun_command] = "/my/command"
        Puppet::Util.expects(:execute).raises Puppet::ExecutionFailure

        lambda { @agent.execute_prerun_command }.should
raise_error(Puppet::Configurer::CommandHookError)
      end
    end

We do actually raise that error. We just happen to rescue it as well, and
continue on.

I have a patch to resolve this, but I'm unsure what we should actually be
testing to ensure this problem doesn't crop up in the future. Should I be
checking the report status instead?

-- 
Nigel Kersten
Product, Puppet Labs
@nigelkersten

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to