summaryrefslogtreecommitdiffstats
path: root/test/util
Commit message (Collapse)AuthorAgeFilesLines
* Reverting the changes I'd made toward removing the globalLuke Kanies2007-11-191-1/+2
| | | | | | | | resources. These are commits: c19835ce9f8a5138b30a1a32ca741c996b0916d2 9290cc89a2206fb5204578f8e91208857a48b147 ffb4c2dbc7314b364d25e4f7be599ef05b767b44
* Fixed most failing tests, but there are still over thirty failing.Luke Kanies2007-11-181-2/+1
| | | | | | At this point, I'm holding the experiment until after the release, so I'm committing this for now and will take it back up after 0.24.0 is out.
* Changing the test/ classes so that they work from the mainLuke Kanies2007-10-2617-17/+17
| | | | | | test/ dir or from their own working dir, like the specs do. This was just a question of changing how their libraries are loaded.
* Make it apparent that absent fields in a record have a value of :absent, ↵Marcin Owsiany2007-10-061-1/+10
| | | | which is different from what appears in a line.
* Merge branch 'master' of ssh://reductivelabs.com/opt/rl/git/puppetLuke Kanies2007-10-0314-14/+0
|\ | | | | | | | | | | | | Conflicts: lib/puppet/defaults.rb lib/puppet/dsl.rb
| * Removing the Id tags from all of the filesLuke Kanies2007-10-0314-14/+0
| |
* | I finally tracked down the problem that was causing providersLuke Kanies2007-10-031-0/+21
|/ | | | | | | | | | | | to sometimes suddenly disappear and thus tests to fail -- Kernel.require was not loading the normal ruby path (e.g., 'puppet/type/cron'), so if someone else loaded that then it would replace the in-memory type with a new one, but that new one couldn't load its own providers, because the Kernel would ignore the providers, thinking they were already loaded. This doesn't fix all of the autoloading problems, but at least we won't suddenly break a ton of tests.
* Renaming the 'Puppet::Util::Config' class toLuke Kanies2007-09-221-9/+9
| | | | | | | 'Puppet::Util::Settings'. This is to clear up confusion caused by the fact that we now have a 'Configuration' class to model host configurations, or any set of resources as a "configuration".
* This is basically another intermediate commit. I feel likeLuke Kanies2007-09-173-318/+5
| | | | | | | | | | | | | | | | | | | | I've gone too far down the rabbit hole to turn back now, but the code is clearly getting more centralized around the Configuration class, which is the goal. Things are currently a bit muddy between recursion, dynamic resource generation, transactions, and the configuration, and I don't expect to be able to clear it up much until we rewrite all of the tests for the Transaction class, since that is when we'll actually be setting its behaviour. At this point, Files (which are currently the only resources that generate other resources) are responsible for adding their edges to the relationship graph. This puts them knowing more than I would like about how the relationship graph works, but it'll have to do for now. There are still failing tests, but files seem to work again. Now to go through the rest of the tests and make them work.
* Refactoring the feature support so it loads libraries when a feature is ↵Luke Kanies2007-09-111-2/+0
| | | | asked about, rather than when it is defined.
* Renaming the instance loader method to "instance_load". It was previously ↵Luke Kanies2007-09-101-4/+4
| | | | autoload, which could class with Kernel.autoload.
* *Finally* fixing the tests that were failing around users and groups. The ↵Luke Kanies2007-09-071-26/+1
| | | | problem was that the autoload tests were somehow clearing all loaded classes, including the providers. This is fixed now.
* Fixing #795 -- configuration elements now make sure all file paths are fully ↵Luke Kanies2007-09-061-1/+16
| | | | qualified by prepending the wd to unqualified path names.
* Making a couple of small bugfixes in the configuration subsystemLuke Kanies2007-08-271-13/+10
|
* I have added basic support for a search path, altho not yet with any ability ↵Luke Kanies2007-08-241-96/+12
| | | | to manipulate it. All config tests pass in both the old tests and the new ones, so it is time to add the hooks for manipulating the search path.
* Adding some rspec tests for Config.rb, because I am planning on ↵Luke Kanies2007-08-231-6/+12
| | | | significantly changing its internals and the current tests, I think, will be harder to migrate than just writing rspec tests from scratch.
* Added shortname support to config.rb and refactored addargsMichael V. O'Brien2007-08-141-25/+88
|
* Refactor SUIDManager tests to run without root, change SUIDManager's ↵christian2007-08-091-109/+0
| | | | | | behavior to not silently fail when it's not root and fix all other tests that broke as a result. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2759 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #735 -- gen_config now uses a single heading, matching the name of ↵luke2007-08-041-23/+57
| | | | | | the process git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2743 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #734. The problem was that when I switched how the configs were ↵luke2007-08-031-7/+49
| | | | | | parsed, I managed to lose the ability to keep values set on the cli from being overridden by values set in config files. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2738 980ebf18-57e1-0310-9a29-db15c13687c0
* Having FileType instances automatically back their contents up to a ↵luke2007-07-111-2/+48
| | | | | | filebucket, so it is much harder to lose content. This does not yet back up crontab contents, though. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2679 980ebf18-57e1-0310-9a29-db15c13687c0
* Changing some of the internals of autoloading so that there is a class-level ↵luke2007-07-101-17/+32
| | | | | | method to query whether a given file has been loaded. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2668 980ebf18-57e1-0310-9a29-db15c13687c0
* Modified the fileserver to cache file information, so thatluke2007-06-191-0/+16
| | | | | | | | | each file isn't being read on every connection. Also, added londo's patch from #678 to avoid reading entire files into memory. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2629 980ebf18-57e1-0310-9a29-db15c13687c0
* Applying the patch by wyvern from #662. This should hopefully kill the ↵luke2007-06-181-6/+9
| | | | | | client hanging problems. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2604 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #643 -- replacing the get_posix_field method with a more degenerate ↵luke2007-06-171-7/+3
| | | | | | version that works even on broken systems git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2598 980ebf18-57e1-0310-9a29-db15c13687c0
* Applying metrics patch from #659 by thijsluke2007-06-141-56/+53
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2579 980ebf18-57e1-0310-9a29-db15c13687c0
* Redoing autoload a bit in preparation for adding a plugindirluke2007-05-163-27/+15
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2518 980ebf18-57e1-0310-9a29-db15c13687c0
* A round of fixes so unit tests pass; most of the failures were from the ↵luke2007-05-151-4/+5
| | | | | | merging of the transaction-refactor branch git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2517 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a module to abstract using Autoload to load and manage instancesluke2007-05-071-0/+53
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2476 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #206 and #422. Executables will still look for the deprecated config ↵luke2007-05-061-100/+200
| | | | | | files and load them using the old parse method, but they now prefer a single configuration file, and files can set parameters (owner, mode, group) in brackets on the same line. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2464 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a fact handler, along with an abstract interface for fact stores and ↵luke2007-05-031-0/+67
| | | | | | a simple yaml fact store, towards the Node Classification work. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2457 980ebf18-57e1-0310-9a29-db15c13687c0
* Set LANG/LC_ALL/LC_MESSAGES/LANGUAGE to 'C' whenever we execute things, so ↵mpalmer2007-05-031-0/+26
| | | | | | that the output that comes back is more easily parsed, without needing to understand all sorts of foreign languages git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2456 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a :block_eval option to FileRecords in FileParsing, so ParsedFile ↵luke2007-04-231-0/+24
| | | | | | providers can have records just define a bunch of methods at once, rather than using lots of hooks. This is cleaner when custom parse and generate methods are used. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2407 980ebf18-57e1-0310-9a29-db15c13687c0
* Fix for #565: Final merge of changes from source:branches/execute-refactor ↵mccune2007-04-031-4/+26
| | | | | | | | | | | | | | | into source:trunk Generated with svn merge -r 2378:HEAD https://reductivelabs.com/svn/puppet/branches/execute-refactor trunk CHANGES: - Puppet::Util#execute now takes hash key/value pairs as arguments after the command array. - Processes executed from the base service provider are now silenced. That is, their standard input, output, and error pipes are all directed to /dev/null. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2385 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing cron support (I hope). It now uses providers, and seems to work, at ↵luke2007-03-171-2/+3
| | | | | | least on my os x box. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2284 980ebf18-57e1-0310-9a29-db15c13687c0
* Significantly reworking the internals of the fileparsing code. It nowluke2007-03-141-106/+213
| | | | | | | | | | | | | | passes around an instance of a FileRecord, rather than just a hash, which I think makes it much easier to understand. Moved the sshkey parsed provider test to its own directory and made it better. This work is all being done so I can move cron jobs to using providers instead of the current unmaintainable state of affairs. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2281 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a bit more testing to the config stuffluke2007-03-081-2/+11
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2273 980ebf18-57e1-0310-9a29-db15c13687c0
* One last try at getting the config and mode stuff working. The tests were ↵luke2007-03-081-0/+32
| | | | | | passing because "mode" is a valid config option in the tests, but not in the real configuration. So, now the Config class correctly only tries to set the meta params if they are valid options, otherwise they get skipped. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2272 980ebf18-57e1-0310-9a29-db15c13687c0
* Looks like [2265] was not a complete solution -- it resulted in failures ↵luke2007-03-081-7/+35
| | | | | | when the config set modes via integers. Everything is working now, and tested more completely. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2268 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #489. I was unnecessarily converting to octal in config.rbluke2007-03-081-81/+99
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2265 980ebf18-57e1-0310-9a29-db15c13687c0
* Merging the webserver_portability branch from version 2182 to version 2258.luke2007-03-064-14/+130
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2259 980ebf18-57e1-0310-9a29-db15c13687c0
* Allow 'key=' to be the only thing on a line (livna uses this)lutter2007-02-211-1/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2218 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #484. Moving unit tests at the same time.luke2007-02-089-0/+1996
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2181 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving some of the stand-alone classes into the util/ subdirectory, to clean ↵luke2007-02-072-13/+13
| | | | | | up the top-level namespace a bit. This is a lot of file modifications, but most of them just change class names and file paths. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2178 980ebf18-57e1-0310-9a29-db15c13687c0
* Revert 2125, and instead change the way the 'latest' version is selected ↵mpalmer2007-01-311-1/+1
| | | | | | from the sorted list of versions git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2132 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #462. The package sort order was always resulting in the ↵luke2007-01-302-1/+1
| | | | | | lowest-version package being first, rather than highest, so I inverted the sort order. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2125 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing graphing tests, and correctly only using storeconfigs in tests where ↵luke2007-01-011-2/+3
| | | | | | rails is available git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2009 980ebf18-57e1-0310-9a29-db15c13687c0
* Make Pidlock#lock return true if we currently hold the lockmpalmer2006-12-311-0/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2001 980ebf18-57e1-0310-9a29-db15c13687c0
* Add a Puppet::Util::Pidlock class, for use by locks and PID filesmpalmer2006-12-311-0/+124
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2000 980ebf18-57e1-0310-9a29-db15c13687c0
* I have not yet finished testing, but most of the providers now successfully ↵luke2006-12-281-7/+10
| | | | | | pass arrays to execute() instead of strings, which means that the vast majority of execution problems are now gone. I will finish testing tomorrow, hopefully, and will also hopefully be able to verify that the execution-related bugs are fixed. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1979 980ebf18-57e1-0310-9a29-db15c13687c0