[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:30:04 UTC 2010
The following commit has been merged in the upstream branch:
commit de94f68a9e30379738722df3c52fc6bb7b056510
Author: Markus Roberts <Markus at reality.com>
Date: Mon Mar 22 17:30:35 2010 -0700
Fixing tests in pkg provider
diff --git a/spec/unit/provider/package/pkg.rb b/spec/unit/provider/package/pkg.rb
index 6001c7b..d0d933d 100644
--- a/spec/unit/provider/package/pkg.rb
+++ b/spec/unit/provider/package/pkg.rb
@@ -43,7 +43,7 @@ describe provider do
result.should be_nil
end
- it "should list package correctly" do
+ it "should fail to list a missing package" do
@provider.expects(:pkg).with(:list, "-H", "dummy").returns "1"
@provider.query.should == {:status=>"missing", :ensure=>:absent,
:name=>"dummy", :error=>"ok"}
@@ -51,13 +51,13 @@ describe provider do
it "should fail to list a package when it can't parse the output line" do
@provider.expects(:pkg).with(:list, "-H", "dummy").returns "failed"
- @provider.query.should == {}
- #== {:status=>"missing", :ensure=>:absent, :name=>"dummy", :error=>"ok"}
+ @provider.query.should == {:status=>"missing", :ensure=>:absent, :name=>"dummy", :error=>"ok"}
end
- it "should fail to list a missing package" do
+ it "should list package correctly" do
@provider.expects(:pkg).with(:list, "-H", "dummy").returns "dummy 1.0 at 1.0-1.0 installed ----"
- lambda { @provider.query }.should raise_error(Puppet::Error)
- #== {:status=>"missing", :ensure=>:absent, :name=>"dummy", :error=>"ok"}
+ @provider.query.should == {:name => "dummy", :version => "1.0 at 1.0-1.0",
+ :ensure => :present, :status => "installed",
+ :provider => :pkg, :error => "ok"}
end
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list