[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35
test branch
puppet-dev at googlegroups.com
Wed Jul 14 10:34:15 UTC 2010
The following commit has been merged in the upstream branch:
commit d67f60fc164fce2ec53c0cde7ea9d9dbf665455a
Author: David Schmitt <david at dasz.at>
Date: Tue May 18 16:42:16 2010 +0200
Fix ProviderDpkg specs to avoid any real executions
diff --git a/spec/unit/provider/package/dpkg.rb b/spec/unit/provider/package/dpkg.rb
index 7e3e8df..d0c1d26 100755
--- a/spec/unit/provider/package/dpkg.rb
+++ b/spec/unit/provider/package/dpkg.rb
@@ -8,6 +8,7 @@ describe provider do
before do
@resource = stub 'resource', :[] => "asdf"
@provider = provider.new(@resource)
+ @provider.expects(:execute).never # forbid "manual" executions
@fakeresult = "install ok installed asdf 1.0\n"
end
@@ -131,6 +132,7 @@ describe provider do
it "should use 'dpkg -i' to install the package" do
@resource.expects(:[]).with(:source).returns "mypackagefile"
+ @provider.expects(:unhold)
@provider.expects(:dpkg).with { |*command| command[-1] == "mypackagefile" and command[-2] == "-i" }
@provider.install
@@ -138,6 +140,7 @@ describe provider do
it "should keep old config files if told to do so" do
@resource.expects(:[]).with(:configfiles).returns :keep
+ @provider.expects(:unhold)
@provider.expects(:dpkg).with { |*command| command[0] == "--force-confold" }
@provider.install
@@ -145,6 +148,7 @@ describe provider do
it "should replace old config files if told to do so" do
@resource.expects(:[]).with(:configfiles).returns :replace
+ @provider.expects(:unhold)
@provider.expects(:dpkg).with { |*command| command[0] == "--force-confnew" }
@provider.install
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list