summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorBen Hughes <ben@puppetlabs.com>2011-04-07 11:33:09 +1000
committerBen Hughes <ben@puppetlabs.com>2011-04-07 11:33:09 +1000
commit19f96b59081558eefd613770fdf8c5f5665a150b (patch)
tree1819e50f8d1b932e895334e4381884e36c517731 /spec/unit
parent06eb3f57f48a57881e8dadc19714366eed5add18 (diff)
downloadfacter-19f96b59081558eefd613770fdf8c5f5665a150b.tar.gz
facter-19f96b59081558eefd613770fdf8c5f5665a150b.tar.xz
facter-19f96b59081558eefd613770fdf8c5f5665a150b.zip
(#6728) Facter improperly detects openvzve on CloudLinux systems
Make the openvz check for more than just the vz directory to be sure it's OpenVZ. Update the OpenVZ fact to be slightly more resilient in it's checking of OpenVZ, so it doesn't clash with CloudLinux's LVE container system.
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/util/virtual_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/unit/util/virtual_spec.rb b/spec/unit/util/virtual_spec.rb
index aa2de5a..36e1bf1 100644
--- a/spec/unit/util/virtual_spec.rb
+++ b/spec/unit/util/virtual_spec.rb
@@ -9,6 +9,7 @@ describe Facter::Util::Virtual do
end
it "should detect openvz" do
FileTest.stubs(:directory?).with("/proc/vz").returns(true)
+ FileTest.stubs(:exists?).with("/proc/vz/veinfo").returns(true)
Facter::Util::Virtual.should be_openvz
end