diff options
author | Matt Wrock <matt@mattwrock.com> | 2016-07-08 11:37:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-08 11:37:21 -0700 |
commit | a24deb8a2c5d642d831d9b22dec6be0f4a9f0182 (patch) | |
tree | 53f182508e05034fa506871cf44fc53944158e0a /spec/unit | |
parent | 4b4d26161050591b6ee3a55786ed56f0ab656767 (diff) | |
parent | b325c3a1da57717df3de7bfbc1ce22a0f3505958 (diff) | |
download | chef-a24deb8a2c5d642d831d9b22dec6be0f4a9f0182.tar.gz |
Merge pull request #5093 from chef/aix2
Warn if not installing an individual bff fileset
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/provider/package/aix_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/provider/package/aix_spec.rb b/spec/unit/provider/package/aix_spec.rb index 6940874a43..2b574bb7df 100644 --- a/spec/unit/provider/package/aix_spec.rb +++ b/spec/unit/provider/package/aix_spec.rb @@ -73,6 +73,19 @@ describe Chef::Provider::Package::Aix do expect(@new_resource.version).to eq("3.3.12.0") end + it "should warn if the package is not a fileset" do + info = "samba.base:samba.base.samples:3.3.12.0::COMMITTED:I:Samba for AIX: + /etc/objrepos:samba.base:3.3.12.0::COMMITTED:I:Samba for AIX:" + status = double("Status", :stdout => info, :exitstatus => 0) + expect(@provider).to receive(:shell_out).with("installp -L -d /tmp/samba.base", timeout: 900).and_return(status) + expect(@provider).to receive(:shell_out).with("lslpp -lcq samba.base", timeout: 900).and_return(@empty_status) + expect(Chef::Log).to receive(:warn).once.with(%r{bff package by product name}) + @provider.load_current_resource + + expect(@provider.current_resource.package_name).to eq("samba.base") + expect(@new_resource.version).to eq("3.3.12.0") + end + it "should return the current version installed if found by lslpp" do status = double("Status", :stdout => @bffinfo, :exitstatus => 0) @stdout = StringIO.new(@bffinfo) |