summaryrefslogtreecommitdiffstats
path: root/spec/unit/util/virtual.rb
Commit message (Collapse)AuthorAgeFilesLines
* Refactor #6044 -- use _spec.rb as the pattern for spec tests.Daniel Pittman2011-01-271-151/+0
| | | | | | Rename all the spec tests to follow the rspec convention of *_spec.rb rather than unadorned *.rb; this also makes it easier to work with them consistently without using the Rakefile support that customizes that.
* Refactor #6044 -- require spec_helper with a consistent path.Daniel Pittman2011-01-271-1/+1
| | | | | | Because we pull in spec_helper in individual tests, we need to use a consistent path or Ruby will evaluate it multiple times. Make the path consistent by expanding it before require.
* Refactor #6044 -- port testing to rspec2Daniel Pittman2011-01-271-1/+1
| | | | We have moved to rspec2 for puppet, and facter should follow suit.
* Merge remote branch 'stschulte/feature/master/5040' into nextPaul Berry2010-11-091-0/+11
|\ | | | | | | | | | | Manually resolved conflicts: lib/facter/virtual.rb spec/unit/virtual.rb
| * (#5040) fact virtual should detect hpvmStefan Schulte2010-11-031-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With HP-UX you can build virtual machines that are often refered to as HP-VMs. This patch detecs HP-VMs by introducing a new function hpvm? that will check the output of /usr/bin/getconf MACHINE_MODEL. This should not depend on any tools that might be not installed. If inside a HP-VM the command will say something like ia64 hp server Integrity Virtual Machine while on real hardware the output could be ia64 hp server rx660 so searching for "Virtual Machine" should work. Currently it only works if the guest is also running HP-UX. (I guess this is the most common usecase).
| |
| \
*-. \ Merge remote branches 'pnasrat/tickets/master/4889' and ↵Rein Henrichs2010-10-181-0/+1
|\ \ \ | | |/ | |/| | | | 'pnasrat/tickets/master/4956' into next
| | * Make sure FreeBSD spec also works on systems that have /proc/cpuinfo.Hans de Graaff2010-09-181-0/+1
| |/
* / [#2865] Fix reporting of virtual factsRein Henrichs2010-08-181-0/+20
|/ | | | | | | | | Regexp tested the s_context or VxID field if /proc/self/status and returned false for 0 and true for any other number. 0 indicates a host, which is still virtual. Fix changes regexp to correctly report hosts as virtual. Tested against vserver 2.1 and 2.3.
* [#4156] Updating spec to match Kai's changeRein Henrichs2010-08-061-1/+1
| | | | | | | Updating the spec to check for the existence of /proc/vz to match the change in the previously applied patch. Signed-off-by: Rein Henrichs <rein@puppetlabs.com>
* Fix #4352 - Support for detecting KVM virtuals on FreeBSDJiri Kubicek2010-07-261-0/+6
| | | | | | There was no support for detecting FreeBSD running in KVM as a virtual in facter. This patch detects KVM by getting "hw.model" kernel state via sysctl. Jails running in KVM are also correctly detected as "jail" not "kvm". Signed-off-by: Jiri Kubicek <jiri.kubicek@kraxnet.cz>
* Fix #4352 - Support for detecting virtuals (jails) on FreeBSDJiri Kubicek2010-07-261-0/+10
| | | | | | There was no support for detecting FreeBSD jails as a virtual in facter. This patch detects jail by getting "security.jail.jailed" kernel state via sysctl. Signed-off-by: Jiri Kubicek <jiri.kubicek@kraxnet.cz>
* Add kvm support to virtual factJohn Ferlito2010-03-081-0/+7
| | | | Based on initial patch by James Turnbull
* Fix broken solaris zone tests on EC2Paul Nasrat2009-09-091-0/+96
This cleans up xen and vserver detection to enable us to stub out so when we happen to be running tests on xen we don't report as that. More cleanup is needed in this area but this should give us a green build. This renames the tests to be consistent with current naming convention