[Pkg-puppet-devel] [facter] 05/46: (#20236) Add example that reproduces dmidecode issue
Stig Sandbeck Mathisen
ssm at debian.org
Sun Sep 1 10:47:26 UTC 2013
This is an automated email from the git hooks/post-receive script.
ssm pushed a commit to branch master
in repository facter.
commit db5281e191a62ff779bd24042b31232bd5f43a5c
Author: Jeff McCune <jeff at puppetlabs.com>
Date: Mon Apr 15 18:30:29 2013 -0400
(#20236) Add example that reproduces dmidecode issue
Without this patch we don't have an example that reproduces the issue
described in 20236. This is a problem because we don't automatically
know when we've fixed the issue.
This patch addresses the problem by adding a single example that
reproduces the issue described in 20236; dmidecode is not consulted when
the lspci command returns data but does not result in a determination of
the virtual platform.
---
spec/unit/virtual_spec.rb | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/spec/unit/virtual_spec.rb b/spec/unit/virtual_spec.rb
index 855da9d..c78870b 100755
--- a/spec/unit/virtual_spec.rb
+++ b/spec/unit/virtual_spec.rb
@@ -205,6 +205,12 @@ describe "Virtual fact" do
end
end
end
+
+ it "(#20236) is vmware when dmidecode contains vmware and lspci returns insufficient information", :focus => true do
+ Facter::Util::Resolution.stubs(:exec).with('lspci 2>/dev/null').returns("garbage\ninformation\n")
+ Facter::Util::Resolution.stubs(:exec).with('dmidecode').returns("On Board Device 1 Information\nType: Video\nStatus: Disabled\nDescription: VMware SVGA II")
+ expect(Facter.fact(:virtual).value).to eq("vmware")
+ end
end
describe "on Solaris" do
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git
More information about the Pkg-puppet-devel
mailing list