summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-06-29 09:36:13 -0700
committerTim Smith <tsmith@chef.io>2017-06-29 09:36:13 -0700
commitf7b1123ebcaae18bc7164362f0edda7f53fe8cd5 (patch)
tree1e813cd2fc006eb5585ae804310d9d758ddfb8b6
parentaa3efd6919c347fcac905ca886acf9406b582685 (diff)
downloadohai-pr/1016.tar.gz
Add a spec for RPM package parsing on AIXpr/1016
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/data/plugins/lslpp.output1
-rw-r--r--spec/unit/plugins/packages_spec.rb4
2 files changed, 5 insertions, 0 deletions
diff --git a/spec/data/plugins/lslpp.output b/spec/data/plugins/lslpp.output
index 0175eacf..7bd592ee 100644
--- a/spec/data/plugins/lslpp.output
+++ b/spec/data/plugins/lslpp.output
@@ -47,3 +47,4 @@ devices.common.IBM.ethernet:devices.common.IBM.ethernet.rte:7.1.1.16: : :C:F:Com
devices.common.IBM.fc:devices.common.IBM.fc.hba-api:7.1.1.16: : :C:F:Common HBA API Library: : : : : : :0:0:/:1228
devices.common.IBM.fc:devices.common.IBM.fc.rte:7.1.1.16: : :C:F:Common IBM FC Software: : : : : : :0:0:/:1228
devices.common.IBM.fda:devices.common.IBM.fda.diag:7.1.0.0: : :C: :Common Diskette Adapter and Device Diagnostics: : : : : : :0:0:/:1036
+wget:wget-1.9.1-3:1.9.1-3: : :C:R:A utility for retrieving files using the HTTP or FTP protocols.: :/bin/rpm -e wget: : : : :0: :/opt/freeware:Wed Nov 5 01:37:09 MST 2014
diff --git a/spec/unit/plugins/packages_spec.rb b/spec/unit/plugins/packages_spec.rb
index ad8c21a3..a97c3280 100644
--- a/spec/unit/plugins/packages_spec.rb
+++ b/spec/unit/plugins/packages_spec.rb
@@ -210,6 +210,10 @@ describe Ohai::System, "plugin packages" do
it "gets packages with version" do
expect(plugin[:packages]["chef"][:version]).to eq("12.5.1.1")
end
+
+ it "properly parses package names for RPMs" do
+ expect(plugin[:packages]["wget"][:version]).to eq("1.9.1-3")
+ end
end
context "on freebsd" do