diff options
author | c5227532 <eike.waldt@sap.com> | 2016-09-28 21:49:22 +0200 |
---|---|---|
committer | c5227532 <eike.waldt@sap.com> | 2016-09-28 21:49:22 +0200 |
commit | ffeea114701237f7d48616fb82b7ca478f71e34d (patch) | |
tree | 0b152f8249b71c83eabcf20d6bc78eb5f973d640 /spec/unit/provider/package/apt_spec.rb | |
parent | 5320cb1b139defb1a37df0a12e26fe8dad1cc8bf (diff) | |
download | chef-ffeea114701237f7d48616fb82b7ca478f71e34d.tar.gz |
added (un)lock_package for apt and zypper
Diffstat (limited to 'spec/unit/provider/package/apt_spec.rb')
-rw-r--r-- | spec/unit/provider/package/apt_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/unit/provider/package/apt_spec.rb b/spec/unit/provider/package/apt_spec.rb index a549ecc72e..9a391c0d88 100644 --- a/spec/unit/provider/package/apt_spec.rb +++ b/spec/unit/provider/package/apt_spec.rb @@ -395,6 +395,28 @@ mpg123 1.12.1-0ubuntu1 end end + describe "when locking a package" do + it "should run apt-mark hold package" do + expect(@provider).to receive(:shell_out!).with( + "apt-mark -q -y hold irssi", + :env => { "DEBIAN_FRONTEND" => "noninteractive" }, + :timeout => @timeout + ) + @provider.lock_package("irssi", "0.8.12-7") + end + end + + describe "when unlocking a package" do + it "should run apt-mark unhold package" do + expect(@provider).to receive(:shell_out!).with( + "apt-mark -q -y unhold irssi", + :env => { "DEBIAN_FRONTEND" => "noninteractive" }, + :timeout => @timeout + ) + @provider.unlock_package("irssi", "0.8.12-7") + end + end + describe "when installing a virtual package" do it "should install the package without specifying a version" do @provider.package_data["libmysqlclient15-dev"][:virtual] = true |