summaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed #2702 - Set :outputdir to "doc" if not specifiedJohn A. Barbuto2009-10-101-0/+6
| | | | Signed-off-by: John A. Barbuto <jbarbuto@corp.sourceforge.com>
* Fix #2672 - Make sure nodenames keep their underscores when used as classnameBrice Figureau2009-09-231-0/+10
| | | | | | | | The #2627 fix was modifying nodename in case of string nodename, but was removing '_'. Since underscores is a valid character in a class name, we now allow it. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2664 - Mathematic expressions mis-lexed as RegexBrice Figureau2009-09-221-0/+4
| | | | | | | | | | | | | | | | This is not the real fix. It is just an hot-fix to limit the issue. The issue is that the lexer regexes have precedences over simple '/' (divide). In the following expression: $var = 4096 / 4 $var2 = "/tmp/file" The / 4... part is mis-lexed as a regex instead of a mathematical expression. The current fix limits regex to one-line. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix for #2654 (error generating error message)Markus Roberts2009-09-221-4/+14
| | | | | | | | | | | | | | Since required_features can (and frequently does) return a single item instead of an Array, the error message needed to be more robust. The tests were not specific enough to catch the fact that an error was being raised in the generation of the error, so a more specific test was added and the required_features accessor test was beefed up a little. Signed-off-by: Markus Roberts <Markus@reality.com> Signed-off-by: Markus Roberts <Markus@reality.com>
* Fix #2642 - Runit provider reworkBrice Figureau2009-09-221-3/+13
| | | | | | | | | | | The runit provider was left broken after some work on daemontools on which runit is based, and #2640 didn't override the restart command, so daemontools once was called. This patch aims to fix this provider and bring it on par with daemontools. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixing #2632 - 'require' works for 0.25 clientsLuke Kanies2009-09-222-10/+18
| | | | | | | | I couldn't find a way to make it compatible with earlier clients, so the docs specify that it doesn't work with them, and it helpfully fails. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing relationship metaparam backward compatibilityLuke Kanies2009-09-221-1/+39
| | | | | | | | | | We broke some cases of metaparam compatibility in 0.25. Most of it was pretty esoteric, but one thing that wasn't working was relationship metaparams specified on defined resources. This adds a compatibility method for older clients. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding version information to the catalog for compatLuke Kanies2009-09-222-0/+21
| | | | | | | We need to be able to do compatibility testing, and this allows us to do so. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2617 - use the cert name as specifiedLuke Kanies2009-09-222-1/+37
| | | | | | | | | | This allows us to search for a cert, and we use the searched-for term as the cert name (for the wrapper, not the actual cert object), rather than the real cert name. This allows us to use symbolic names like 'ca', as we're currently doing. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2656 - puppet parseonly tests don't hangLuke Kanies2009-09-191-0/+1
| | | | | | | It was hanging reading stdin because no code had been supplied. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fix #2638 - Allow creating several nodes with matching namesBrice Figureau2009-09-172-2/+19
| | | | | | | | When we are checking if a node exists before creating a new one we were also trying to match with regex node names, finding matches where in fact there is no equality. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix for #2621 (JSON serialization of exec)Markus Roberts2009-09-161-6/+0
| | | | | | | Removed the array wrapping of values for JSON serialization, and the associated test. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fix #2640 - Daemontools and Runit were not creating the enable symlinkBrice Figureau2009-09-162-3/+21
| | | | | | | | Due to an incorrect tests, those providers weren't enabling themselves when starting, thus failing to create the symlink necessary for them to run. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2627 - regex node name could lead to invalid tagBrice Figureau2009-09-161-0/+5
| | | | | | | | | We're converting the regex to a straight name to be used as the node class name which later on will be used as tag. It was possible to generate an invalid tag name (containing leading or successive dots). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Merged fix for #2601Markus Roberts2009-09-161-0/+62
| | | | | | | | | | | This patch rolls up the changeses discussed on the list & the ticket The fqdn_rand now takes any number of additional arguments of any type that has a string representation (typically integers or strings) and concatenats them on to the salt. The tests have been adjusted to reflect this. Signed-off-by: Markus Roberts <Markus@reality.com>
* Make regsubst() function operate on arrays (feature #2491).Thomas Bellman2009-09-151-0/+80
| | | | | | | | | | | Allow the first argument to the regsubst() function be an array, and perform regexp replacement on each element of the array in that case. This patch also adds more error checking to give better error messages to the user when given bad parameters. Signed-off-by: Thomas Bellman <bellman@nsc.liu.se>
* Fix for #2600 (wrong number of arguments under older mongrel)Markus Roberts2009-09-151-9/+31
| | | | | | | | | | | | | | | | | | This was an API compatibility problem with mongrel's HTTPResponse.start() method between Mongrel 1.0.x and 1.1.x (the number of parameters changed). The older version does not provide the option to set the response header message which was used (redundantly with the response body) to return the error message when the HTTP response was signaling an error. In order to suport the older version the call was wrapped with a fallback and the coresponding code in the other rest implementations was adjusted to always send the error message in the response body. Then the rest terminus was adjusted to pull the message from the response body (if it is present) rather than from the header (which is only used as a fallback for dealing with older puppetmasters), and the tests were augmeted to verify this behaviour. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fixs #2620 authconf interpolation, #2570 0-9 in domain namesMarkus Roberts2009-09-141-28/+77
| | | | | | | | | | | | | | Partial refactoring to clean up the case in the ticket (host name containing dots, begining and ending with a digit, was mistaken for an IP address) and a range of related edge cases. Stopped short of a full refactoring (put off to 0.26 as #2623) Added tests for numerous edge cases. This also fixes the issue raised in #2570. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fix for ticket #2618 (stubbing so redhat tests run under debian)Markus Roberts2009-09-091-0/+2
| | | | | | | | This adds stubs so that the service script used by redhat appears to exist while the tests are running, regardless of the operating system being used to test. Signed-off-by: Markus Roberts <Markus@reality.com>
* Adding tests for the #2599 fixLuke Kanies2009-09-051-0/+11
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Updated permissions on test filesJames Turnbull2009-09-055-0/+0
|
* Refactoring tests to reduce code size, increase coverage, and makeMarkus Roberts2009-09-052-111/+49
| | | | Luke happy.
* This further normalizes the handling of init-style services (includingMarkus Roberts2009-09-052-0/+262
| | | | | | | | | the redhat "service" wrapper script). Removes special case handling of non-zero exit code in redhat (base already did this) and centralizes scattered @resource[:has_____] checks. Tests that proper versions of each are called and one level of fallbacks. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fixed #2589 - Renamed zfs delete to destroy and added testsJames Turnbull2009-09-051-2/+14
|
* Fixed typo in parser testJames Turnbull2009-09-051-1/+1
|
* Fixing #2592 - you can escape slashes in regexesLuke Kanies2009-09-041-0/+14
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2590 - modulepath is not cached inappropriatelyLuke Kanies2009-09-031-0/+5
| | | | | | | | | | | | | | | | It was getting cached by Environment instances too early, thus causing some executables to use the default even when it was overridden. We're taking the slightly extreme step of clearing the environment list if any parameter is set, but this is relatively inexpensive and is the only way to always be correct. The reason that the environments cache this value at all is that to build up their module path they have to search through every known module for a lib or plugins directory, which is then done every time a class is sought in the language. Caching it saves a *ton* of file accesses. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixes #2581. Use new 10.6 global launchd overrides file for service ↵Nigel Kersten2009-09-031-0/+58
| | | | status/enabled
* Fixing #2582 - / no longer autorequires /Luke Kanies2009-09-011-0/+18
| | | | | | This was obviously resulting in a dep cycle. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2577 - clarifying and demoting the deprecation noticeLuke Kanies2009-09-012-18/+22
| | | | | | | It's now just notice instead of a warning, and it clarifies that 0.24 clients can't be present. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2574 - autoloading finds plugins in modulesLuke Kanies2009-09-012-3/+35
| | | | | | | | We had some stupid errors that were preventing this from happening; this fixes them and adds an integration test. Signed-off-by: Luke Kanies <luke@madstop.com>
* The first regex node now matches firstLuke Kanies2009-09-011-3/+4
| | | | | | | Before it was undefined, but now we always match the first defined node. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2563 - multiple regex nodes now work togetherLuke Kanies2009-09-011-0/+38
| | | | | | | | | | The problem was that we were needing to convert one of the regexes to a string, which wasn't working well. This adds specific rules for how regexes vs. strings get compared. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fix for test isolation portion of Ticket #2511Markus Roberts2009-08-241-12/+11
| | | | | | | | | Ticket #2511 comprises two distinct problems with very similar symptoms. This patch addresses one of them, the test failures which result from spec/units/util/backups.rb directly requiering type/file. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fixing #2549 - autoloading of top-level classes works againLuke Kanies2009-08-241-0/+6
| | | | | | | | This was broken in the recent refactor around autoloading, which didn't special-case classes that specified that they were top-level. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing a heisenbug resulting from a race conditionLuke Kanies2009-08-241-1/+3
| | | | | | | | | | | We had a case where an expectation could be triggered before the thread finished, in which case it was marked as a failure. We just stub the Thread.new to avoid creating a "real" thread, thus skipping the race condition. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2460 - puppetmasterd can now read the cert and keyLuke Kanies2009-08-241-0/+10
| | | | | | | | | | | | This follows on to the previous commits which made Puppet resilient to the service user being absent. This just changes the default owner of all of the cert-related files to now be the service user, which means that on the server all of these files will be owned by that user and on the client, at least when the service user does not exist, they will be owned by root. Signed-off-by: Luke Kanies <luke@madstop.com>
* Not using the service user in settings when it's unavailableLuke Kanies2009-08-243-44/+106
| | | | | | | | | This gets us most of the way toward fixing #2460 - we can now have the certificate information owned by the service user when it's available, thus making it so that puppetmasterd (not running as root) can read it. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding an 'exists?' delegator from user type to providerLuke Kanies2009-08-241-0/+6
| | | | | | | We need this knowledge from the Settings class, and it makes more sense to delegate than to use direct access to the provider. Signed-off-by: Luke Kanies <luke@madstop.com>
* Switching the owner/group settings to use symbolic valuesLuke Kanies2009-08-241-1/+68
| | | | | | | | | | | | | | We previously allowed the owner and group to be set to arbitrary values but we never actually used it -- we always just set them to '$user' or '$group'. This commit changes the model to allow 'root' or 'service', where 'service' is converted to the actual service user/group. This has the potential to have backward compatibility concerns, because users could have changed the owner/group in puppet.conf, but the chances of that are fantastically small. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing the yamldir group to be a group instead of userLuke Kanies2009-08-241-0/+5
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Moving Setting classes into separate filesLuke Kanies2009-08-243-121/+128
| | | | | | | | This isn't really a refactor, just moving code around. I did some simple method renaming, also. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing a ruby warning in the authstore testLuke Kanies2009-08-241-1/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2558 - propagating recent fileserving changesLuke Kanies2009-08-247-121/+163
| | | | | | | | | | | | | | | | | | I'd made changes to the internals of the fileserving system to fix #2544 (mostly switched from passing the node around and then calculating the environment to just passing the environment around), but those changes weren't consistent throughout the fileserving code. In the process of making them consistent, I realized that the plain file server actually needs the node name rather than the environment, so I switched to passing the request around, because it has both pieces of information. Also added further integration tests which will hopefully keep this from cropping up again. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #2562 - Recognize the usecacheonfailure option againJohn A. Barbuto2009-08-211-0/+10
| | | | Signed-off-by: John A. Barbuto <jbarbuto@corp.sourceforge.com>
* Refactoring the Module/Environment co-interfaceLuke Kanies2009-08-182-102/+56
| | | | | | | This simplifies who owns what code in these two classes, and the result should be much cleaner and simpler. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #1544 - plugins in modules now works againLuke Kanies2009-08-186-51/+125
| | | | | | | | | | | | We had to fix the fileserving plumbing to use the request environment instead of trying to use the node environment. This was apparently never fixed after we added the environment to the URI in REST calls. There's still a bit of refactoring left to clean up the APIs used in some of this code. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding a global cleanup to the spec_helperLuke Kanies2009-08-181-3/+4
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Removed misguided case sensitivity testsMarkus Roberts2009-08-182-19/+0
| | | | | | | | Removed two failing tests added in the process of reproducing #2493 because they enforced case-insensitivity in excess of that provided by 0.24.8 and thus contrary to user expectations. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fixes #2513. debian service provider now uses invoke-rc.d to determine ↵Nigel Kersten2009-08-181-0/+89
| | | | enabled? status