[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5
Paul Berry
paul at puppetlabs.com
Tue May 10 08:02:24 UTC 2011
The following commit has been merged in the experimental branch:
commit 99f4d2fe6c3e9d7483206c0788ba5b3fe9f48454
Author: Paul Berry <paul at puppetlabs.com>
Date: Tue Nov 23 13:19:59 2010 -0800
Maint: made upstart tests more robust.
The tests for the upstart provider were attempting to stub
Process::Status.exitstatus. However, this doesn't work (presumably
because Process::Status is implemented in C). As a result, the
upstart spec tests were failing if the most recent exit code was
nonzero. Changed the tests so that instead of stubbing
Process::Status.exitstatus to return zero, they execute a command that
is known to succeed (`true`).
Paired-with: Jesse Wolfe <jesse at puppetlabs.com>
diff --git a/spec/unit/provider/service/upstart.rb b/spec/unit/provider/service/upstart.rb
index 439fd2c..9fde9e6 100644
--- a/spec/unit/provider/service/upstart.rb
+++ b/spec/unit/provider/service/upstart.rb
@@ -24,8 +24,7 @@ describe provider_class do
resource = Puppet::Type.type(:service).new(:name => "foo", :provider => :upstart, :status => "/bin/foo")
provider = provider_class.new(resource)
- Process::Status.any_instance.stubs(:exitstatus).returns(0)
- provider.expects(:ucommand)
+ provider.expects(:ucommand).with { `true`; true }
provider.status.should == :running
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list