summaryrefslogtreecommitdiffstats
path: root/spec/unit/util
Commit message (Collapse)AuthorAgeFilesLines
...
* 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-091-0/+36
| | | | | | | | | 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 #2470 - duplicate entries in interfaces factPaul Nasrat2009-08-121-0/+7
| | | | | 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-161-0/+60
| | | | Add tests and utility for virtual fact detection
* Tests for #2227 - multiple interfaces on DarwinPaul Nasrat2009-05-131-0/+6
| | | | | | | | | | | | 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
* Facter fix #2231 typoPaul Nasrat2009-05-121-0/+10
| | | | Added a test to pickup typo and fix
* Fixing ifconfig warnings generated on OS XLuke Kanies2009-04-201-3/+13
| | | | | | | | The interface collection regex was leaving trailing ':' characters on the interface names, which meant individual interfaces weren't quite right. Signed-off-by: Luke Kanies <luke@madstop.com>
* correctly compare values - fixes #2021Peter Meier2009-04-071-5/+70
| | | | | | | | | | | | | | this ensures we can compare all kind of objects and not only instances of strings. It compares strings in a case-insensitive manner and converts symbols to strings. introducing this behavior required that we introduce a convert util method, to ensure that we convert the value correctly. Introduced this method in other places as well. This behavior change requires that we drop one test, which have become anyway deprecated.
* Fixing #1927 - failing facts don't kill FacterLuke Kanies2009-02-041-0/+6
| | | | | | Facts that raise exceptions just return nil now. Signed-off-by: Luke Kanies <luke@madstop.com>
* Renaming Facter::Macosx to Facter::Util::MacosxLuke Kanies2009-01-271-13/+13
| | | | | | This name change just reflects the file location. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #1838 - profiler failures don't throw exceptionsLuke Kanies2009-01-271-0/+47
| | | | | | | Also added tests to the macosx code; it's much cleaner and actually tested now. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #1870 - Format all subnet masks as human-readableJames Turnbull2009-01-271-0/+17
|
* Fix bug #1870 and add interface fact support for darwin systemsPaul Nasrat2009-01-151-1/+11
|
* Refactoring the IP support, and fixing #1846.Luke Kanies2009-01-151-8/+40
| | | | | | | | | | | | | | | | I've made the IPMess stuff a lot less messy, and refactored a lot of the util/ip module, including naming it more sensibly. The biggest changes are that I moved the big case statement into a constant and then used a bit of dispatch-style logic to use it, and I eliminated a bunch of duplicate code in the ipmess.rb file. Added some test data for FreeBSD and fixed a bug in my map logic pointed out by Paul Nasrat. I've also fixed #1846, in that the interface list now s/:/_/g. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing indentation everywhereLuke Kanies2009-01-153-7/+4
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Added a Process.waitall thread when there's a timeout, to avoid zombies.Luke Kanies2008-08-181-0/+11
| | | | Without this call, every time there's a timeout, we'll get a zombie.
* Merge commit 'pnasrat/tickets/1422'Luke Kanies2008-08-181-2/+2
|\
| * Facter fix #1422, no default timeoutPaul Nasrat2008-08-181-2/+2
| |
* | Add unit rspec tests for ticket 1425Paul Nasrat2008-08-131-0/+10
| |
* | Extract ifconfig output to data directoryPaul Nasrat2008-08-131-22/+4
| |
* | Add sample test and strawman solution for IP parsing codePaul Nasrat2008-08-111-0/+30
| |
* | Add module level tests for Facter::IPAddressPaul Nasrat2008-08-111-0/+18
|/
* Retaining 'timeout' as the settor, but using 'limit' as the getter.Luke Kanies2008-06-202-5/+19
| | | | | | | I don't like using Fact.add(:fact, :limit => 5), so I added a little extra code to allow us to continue using ':timeout => 5', but use 'limit' for retrieving the value, to avoid the conflict Steve Hajducko is seeing.
* Changed 'timeout' option to 'limit'Steven Hajducko2008-06-192-6/+6
| | | | | This was done to avoid a possible variable scoping issue that was occuring on some AIX systems.
* Refactored so each fact resolution can specify a separate timeout,Luke Kanies2008-06-173-7/+56
| | | | | | but the default is still 0.5. Set the timeout on the AIX kernelrelease fact to 5 seconds.
* Adding a timeout to fact retrieval, fixing #56.Luke Kanies2008-05-201-0/+7
| | | | | The timeout is currently 0.5 seconds, which should generally be enough time.
* Switching to a search path registration system.Luke Kanies2008-05-161-0/+7
| | | | | Facter no longer knows anything about Puppet, so there's no inter-dependency issue.
* Moving the puppet-related loading tests to an integration test.Luke Kanies2008-05-161-31/+0
| | | | | | | | | I was previously creating a mock Puppet class, and this actually uses Puppet's code. Note that this use of Puppet creates some additional ordering problems, which I'm going to fix in the next commit by undoing all of this work. :)
* Retrieval of fact values now autoloads facts.Luke Kanies2008-05-161-1/+6
| | | | | I was only autoloading in certain circumstances, but it now autoloads any time you try to load a fact directly.
* Switching Facter to using the new loader.Luke Kanies2008-05-152-0/+74
| | | | | This should make it possible to move all facts to separate files and only load them on demand.
* Fixing the test so it doesn't break other tests.Luke Kanies2008-05-151-1/+13
| | | | | | It creates a constant that affects loader behaviour, which causes other tests to break if the constant is present but not functional.
* Moving all of the support classes to util/.Luke Kanies2008-05-155-0/+739
This makes it easier for our loader to distinguish between code that Facter uses and new facts.