summaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
| * (#5040) fact virtual should detect hpvmStefan Schulte2010-11-032-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 branch 'stschulte/ticket/master/5016' into nextPaul Berry2010-11-091-0/+6
|\ \ | | | | | | | | | | | | | | | Manually resolved conflicts: lib/facter/virtual.rb spec/unit/virtual.rb
| * | (#5016) is_virtual should be true on solaris zonesStefan Schulte2010-11-031-0/+6
| |/ | | | | | | | | | | | | While the fact virtual recognised solaris zones before, the is_virtual fact did not. With this patch applied is_virtual returns true on (non-global) zones
| |
| \
*-. \ Merge remote branches 'pnasrat/tickets/master/4889' and ↵Rein Henrichs2010-10-182-6/+7
|\ \ \ | | | | | | | | | | | | '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
| | |/
| * / Issue #4889 Fact values should all be stringsPaul Nasrat2010-10-071-6/+6
| |/ | | | | | | Fix is_virtual fact to return strings rather than bools.
* | Merge branch 'ticket/master/4552' into nextRein Henrichs2010-10-051-0/+27
|\ \ | | | | | | | | | | | | | | | Conflicts: bin/facter lib/facter/application.rb
| * | [#4552] Apply patch from Dean WilsonRein Henrichs2010-10-041-0/+27
| | |
| * | [#4289] operatingsystemrelease fact for oel, ovsRein Henrichs2010-10-041-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | When Facter returns operatingsystem as "oel" or "ovs", the operatingsystemrelease fact does not catch these properly, causing an error. Specs added to catch failure and case statement updated to catch "oel" and "ovs" as well as "OEL" and "OVS"
* | | Merge branch 'master' into nextRein Henrichs2010-08-201-0/+39
|\ \ \ | | |/ | |/|
| * | [#4289] operatingsystemrelease fact for oel, ovsRein Henrichs2010-08-181-0/+39
| |/ | | | | | | | | | | | | | | | | When Facter returns operatingsystem as "oel" or "ovs", the operatingsystemrelease fact does not catch these properly, causing an error. Specs added to catch failure and case statement updated to catch "oel" and "ovs" as well as "OEL" and "OVS"
* | Merge branch 'ticket/master/3703-macaddress-on-mac' into nextRein Henrichs2010-08-1828-0/+552
|\ \
| * | Removing stupid .DS_Store files :(Rein Henrichs2010-08-112-0/+0
| | |
| * | [#3703] Fix macaddress fact for DarwinRein Henrichs2010-08-1130-0/+552
| |/ | | | | | | * With tests for 9.8.0, 10.3.0 and 10.6.4
* / [#2865] Fix reporting of virtual factsRein Henrichs2010-08-185-0/+171
|/ | | | | | | | | 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>
* Merge remote branch 'kubicek/ticket/master/4352'Rein Henrichs2010-08-062-0/+29
|\
| * Fix #4352 - Support for detecting KVM virtuals on FreeBSDJiri Kubicek2010-07-262-0/+13
| | | | | | | | | | | | 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-262-0/+16
| | | | | | | | | | | | 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>
| |
| \
*-. | Merge branches 'ticket/master/2330-uptime', 'ticket/master/4062-meego' and ↵Rein Henrichs2010-08-066-0/+169
|\ \| | | | | | | | | | 'ticket/master/4453-rakefile'
| * | [#2330] Uptime should not make redundant system callsRein Henrichs2010-08-036-0/+169
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite of uptime facts and supporting utility methods. Works on unix, BSD, windows. No longer makes redundant system calls. Uses Facter::Util::Uptime utility methods: * Implemented uptime_seconds_unix using /proc/uptime or who -b on unix, sysctl on BSD. Added unit tests for the behaviors of get_uptime_seconds_unix: read from proc/uptime, read uptime from "sysctl -b kern.boottime", read uptime from "who -b", and return nil if nothing else works. * Implemented uptime_seconds_win using the Win32 API. Facts implemented: * uptime_{seconds,hours,days} Returns the respective integer value. * uptime Returns human readable uptime statistic that preserves original behavior. Examples: 3 days 1 day 5:08 hours 0:35 hours
* | Facter::Manufacturer - sunos test + simplified regexMarc Fournier2010-08-041-0/+12
| | | | | | | | | | | | | | | | | | The 2nd regex (with the 0x\d+) got removed because it appears to never be used, even on SunOS, for which it has been introduced (99833a1b / #1793). The 3dn regex is changed to clearly confine the value between mandatory newlines/whitespaces.
* | Facter::Manufacturer - test for SunOS and FreeBSDMarc Fournier2010-08-043-0/+98
|/ | | | | This test compares a fact made with dmidecode (linux and bsd) with one using smbios (solaris).
* Adding HP-UX support to Facter's IP factsJames Turnbull2010-06-153-2/+68
| | | | Includes Rspec tests
* Fixed #3393 - Updates to Facter for MS WindowsDavid Schmitt2010-06-151-11/+43
| | | | | | | | | | This patch is originally by Daniel Berger <djberg96@gmail.com>, I changed using Facter.value instead of repeatedly testing Config['host_os'], removed Resolution::which, and fixed the specs. Thanks to Paul Nasrat for helping with cross-platform debugging. Signed-off-by: David Schmitt <david@dasz.at>
* Fixed #3403 - Added fact to query vlans; added spec testJonas Genannt2010-06-132-0/+20
|
* Fixed failing test introduced by previous commitMarc Fournier2010-05-071-2/+2
|
* Fixes #3740 - split dmi output on regexMarc Fournier2010-05-071-1/+39
| | | | | | | | Splitting dmi output on the string "/^Handle/" didn't work, and caused the function to match the wrong key if it was found more than once. The intended behaviour of the function is restored by splitting the dmi output on the regex /^Handle/.
* Fix virtual unit test on non-linux by stubbing kernelPaul Nasrat2010-04-261-0/+1
| | | | Signed-off-by: Paul Nasrat <pnasrat@googlemail.com>
* Fixed #3541 - Ruby 1.9: broken unittest, unexpected invocation: ↵James Turnbull2010-04-241-0/+1
| | | | | | Process.waitall() Thanks to Jos Backus for the fix.
* Add kvm support to virtual factJohn Ferlito2010-03-082-0/+13
| | | | Based on initial patch by James Turnbull
* Revert "use popen3 in Resolution.exec"Paul Nasrat2010-02-281-44/+0
| | | | | | | | | | | This reverts commit 33fb7709404e706801683e6c47ab7a0a5a1884b1. This has broken master for some facts (eg OS X facts), it also breaks facter platform support on win32 as popen3 does not work there. I'd like to get master working, backlog of patches applied and revisit exec. Paul
* Fix #2341 - stricter handling of dmidecode splitPaul Nasrat2010-01-301-0/+22
| | | | This adds a test to ensure we are not prematurely splitting on Handle
* Remove whitespace in DMI facts (#3008, #3011)Paul Nasrat2010-01-102-0/+86
| | | | | | | | | In addition to the stripping of the output of these facts this patchset: Refactor - Extracted function to enable easier testing. Tests - data driven tests for the dmidecode/smbios fact. Paul
* use popen3 in Resolution.exec to catch stderrPeter Meier2009-11-081-0/+44
| | | | | | | | | | | | | | | | | | | So far messages to stderr haven't been catched by Facter::Util::Resolution.exec and were insted printed out to stderr. This will cause facter and even puppet to print to stderr themself, which is not very nice when running puppetd by cron, as you might get every run a mail if a command outputs to stderr. We are now wrapping the command execution with Open3.popen3 to catch stderr and passing them to the new introduced Facter.warn method. We are also catching multiline outputs chomping newlines and returning an array if there have been more than one line. Otherwise we return an array containing the different lines. This prevents in general cases as described in #2766 and should handle command execution in a bit saner way.
* introduce a warn mechanism for debuggingPeter Meier2009-11-071-0/+73
| | | | | We can now warn messages that will be passed to Kernel.warn if debugging is enabled.
* Issue #2414 - add unit testPaul Nasrat2009-09-091-0/+6
| | | | This adds a unit test on top of Kurt's patch
* Fix 2455 - improve error handling on fact loadPaul Nasrat2009-09-092-0/+31
| | | | | | Fix facts added with empty blocks by handling calls to value when setcode not called Ensure we handle load failures more gracefully
* Fix broken solaris zone tests on EC2Paul Nasrat2009-09-092-0/+38
| | | | | | | | | 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
* Issue #2548 netblock factPaul Nasrat2009-08-241-0/+10
| | | | | | We already have a network fact it's just missing a test. Paul
* Fix bug where you'd get an 'undefined method' error if trying to access a ↵Diego Algorta2009-08-141-0/+16
| | | | fact's value when collection has not being yet initialized.
* Fix #2470 - duplicate entries in interfaces factPaul Nasrat2009-08-122-0/+15
| | | | | Solaris orders inet and inet6 seperately. This tests for and fixes this by uniqueing the list. Will probably need work when we get to ipv6 support.
* Update OS X minor version fact to cope with '10.x' values and provide test ↵Nigel Kersten2009-08-071-0/+34
| | | | | | coverage switch %x{} call to Facter::Util::Resolution.exec for better testing
* Issue #2292 Add tests for virtual factsPaul Nasrat2009-07-162-0/+109
| | | | Add tests and utility for virtual fact detection
* Fix broken ci build with explicit clearing before testsPaul Nasrat2009-07-111-1/+4
|
* Change spec output to enable broken build debuggingPaul Nasrat2009-07-111-0/+2
|
* Tests for #2227 - multiple interfaces on DarwinPaul Nasrat2009-05-132-0/+16
| | | | | | | | | | | | This seems to have been fixed functionally on master (in /Users/pnasrat/Development/facter/spec) Finished in 1.604955 seconds 183 examples, 0 failures However I want to take the opportunity to add tests to prevent regressions Paul
* Added SELinux testsJames Turnbull2009-05-131-0/+48
|
* Facter ticket 2214 - Fix facts for OVSPaul Nasrat2009-05-121-0/+36
| | | | | | | | Added tests for operatingsystem fact covering the two simple cases and a test for this specific interaction of release files We should take some time to add tests when we're adding or changing new operatingsystem facts
* Facter fix #2231 typoPaul Nasrat2009-05-121-0/+10
| | | | Added a test to pickup typo and fix