summaryrefslogtreecommitdiffstats
path: root/spec/unit/util/virtual.rb
diff options
context:
space:
mode:
authorPaul Berry <paul@puppetlabs.com>2010-11-09 16:04:15 -0800
committerPaul Berry <paul@puppetlabs.com>2010-11-09 16:04:15 -0800
commitee5f78a94e0aa1e12945e90f8c47d8be78ed00f8 (patch)
tree6d430e20f3acc22dd855bc20eda5753b206a838d /spec/unit/util/virtual.rb
parent54d742235279863ba455900e053ecdc2b764e564 (diff)
parent43e203c688399ac86d337514aecb6fa0c9def683 (diff)
downloadfacter-ee5f78a94e0aa1e12945e90f8c47d8be78ed00f8.tar.gz
facter-ee5f78a94e0aa1e12945e90f8c47d8be78ed00f8.tar.xz
facter-ee5f78a94e0aa1e12945e90f8c47d8be78ed00f8.zip
Merge remote branch 'stschulte/feature/master/5040' into next
Manually resolved conflicts: lib/facter/virtual.rb spec/unit/virtual.rb
Diffstat (limited to 'spec/unit/util/virtual.rb')
-rw-r--r--spec/unit/util/virtual.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/util/virtual.rb b/spec/unit/util/virtual.rb
index 7ba946a..72186f7 100644
--- a/spec/unit/util/virtual.rb
+++ b/spec/unit/util/virtual.rb
@@ -137,4 +137,15 @@ describe Facter::Util::Virtual do
Facter::Util::Virtual.should_not be_jail
end
+ it "should detect hpvm on HP-UX" do
+ Facter.fact(:kernel).stubs(:value).returns("HP-UX")
+ Facter::Util::Resolution.stubs(:exec).with("/usr/bin/getconf MACHINE_MODEL").returns('ia64 hp server Integrity Virtual Machine')
+ Facter::Util::Virtual.should be_hpvm
+ end
+
+ it "should not detect hpvm on HP-UX when not in hpvm" do
+ Facter.fact(:kernel).stubs(:value).returns("HP-UX")
+ Facter::Util::Resolution.stubs(:exec).with("/usr/bin/getconf MACHINE_MODEL").returns('ia64 hp server rx660')
+ Facter::Util::Virtual.should_not be_hpvm
+ end
end