diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-02-17 10:07:28 -0600 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-02-17 13:58:08 -0800 |
commit | 289063289a90f1f4bd00ed16bd1f9d38ac30906b (patch) | |
tree | fd0063f0c0a6c78e0176ffa67d84dc71d45340bc | |
parent | e40a02ecbb9c806ca7782741492dc7be2423d884 (diff) | |
download | chef-lcg/fix-multipackage.tar.gz |
Added spec for #2914lcg/fix-multipackage
-rw-r--r-- | spec/unit/provider/package/apt_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/unit/provider/package/apt_spec.rb b/spec/unit/provider/package/apt_spec.rb index 2ca48fd1ed..8528480689 100644 --- a/spec/unit/provider/package/apt_spec.rb +++ b/spec/unit/provider/package/apt_spec.rb @@ -365,6 +365,21 @@ mpg123 1.12.1-0ubuntu1 @provider.install_package("libmysqlclient-dev", "not_a_real_version") end end + + describe "when installing multiple packages" do + it "can install a virtual package followed by a non-virtual package" do + # https://github.com/chef/chef/issues/2914 + @provider.is_virtual_package['libmysqlclient-dev'] = true + @provider.is_virtual_package['irssi'] = false + expect(@provider).to receive(:shell_out!).with( + "apt-get -q -y install libmysqlclient-dev irssi=0.8.12-7", + :env => {"DEBIAN_FRONTEND" => "noninteractive", "LC_ALL" => nil }, + :timeout => @timeout + ) + @provider.install_package(["libmysqlclient-dev", "irssi"], ["not_a_real_version", "0.8.12-7"]) + end + end + end end end |