summaryrefslogtreecommitdiffstats
path: root/spec/unit
Commit message (Collapse)AuthorAgeFilesLines
...
* Make sure virtual and rails query use tags when tag are searchedBrice Figureau2009-06-062-2/+23
| | | | | | | | | | | | Up to now, when trying to match with tags: File<<| tag == 'value' |>> in fact we were querying parameters. Hopefully all the user tags are stored in parameters so it was working. But it wasn't possible to search on auto-tags (like class name). This patch makes sure searching by tag is done on tags both on the rails side and the resource side. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Make sure resources are tagged with the user tag on the serverBrice Figureau2009-06-061-0/+7
| | | | | | | | It appears that resources were not tagged with user tag on the server, which prevents those tags to be persisted as tag in the storeconfigs. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2246 - Array tagged resources can't be collected or exportedBrice Figureau2009-06-061-2/+4
| | | | | | | | | | | | I don't know why we imposed the restriction that we shouldn't match with parameter containing arrays in exported mode. That doesn't seem right, as the produced rails query works fine with arrays. Note: the user tags are not stored in the rails database except under the special resource parameter tag. This also doesn't seem right. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Removed extra whitespace from end of linesIan Taylor2009-06-0676-326/+326
|
* Changed tabs to spaces without interfering with indentation or alignmentIan Taylor2009-06-066-137/+137
|
* Fix #2308 - Mongrel should use X-Forwarded-ForBrice Figureau2009-06-051-0/+16
| | | | | | | | | | | | Mongrel puppet code uses REMOTE_ADDR to set the ip address which will be use to authenticate the client access. Since mongrel is always used in a proxy mode with Puppet, REMOTE_ADDR is always the address of the proxy (usually 127.0.0.1), which defeats the purpose. With this changeset, the mongrel code now uses the X-Forwarded-For HTTP header value if it is passed over the REMOTE_ADDR. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* * provider/augeas: minor spec test cleanupDavid Lutterkort2009-06-031-29/+30
| | | | | | - rename some tests to make their purpose clearer - add a test for nested predicates - remove trailing whitespace
* * provider/augeas: allow escaped whitespace and brackets in pathsDavid Lutterkort2009-06-031-0/+7
|
* * provider/augeas: match comparison uses '==' and '!=' againDavid Lutterkort2009-06-031-4/+4
| | | | | | Change the syntax for match in an onlyif back to using '==' for equality comparison instead of 'eq' (this was the behavior before 9a2642) and make operator for inequality '!='.
* Brought in lutters parse_commands patch and integrated it into the type.David Lutterkort2009-06-031-109/+105
| | | | | | | | | | | | | | | | | | | | | This includes reworking the get and match commands as well. This change introduces a few small changes. These are: 1) There can be no ' or " characters around path elements. 2) The context is now only prepended to relative paths. So, if a path is specified as /foo/bar the context will not be appended. It will only be appended if it is foo/bar 3) The syntax for array matching in the onlyif is now eq or noteq. It was == before. 4) The get and set commnands used to concatenate all items at the end of a string so "set path to some value" would be interpreted as "set" "path" "to some value". This is no longer supported. The caller must put ' or " around the "to some value" for it to work" Cherry-pick of 9a2642 from 0.24.x Conflicts: lib/puppet/provider/augeas/augeas.rb
* Fixing a bunch of warningsLuke Kanies2009-06-033-5/+5
| | | | | | This commit should have no functional effect. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing tests broken by a recent fix to CacherLuke Kanies2009-06-031-3/+3
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Always providing a value for 'exported' on Rails resourcesLuke Kanies2009-06-031-0/+45
| | | | | | | | | | | We often didn't set a value, unless it was true, which meant that if it had previously been true but was now false, we didn't fix it. We also were not always saving modified resources, which in some cases resulted in work not getting saved. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2230 - exported resources work againLuke Kanies2009-06-031-0/+5
| | | | | | | | This somehow got lost in the conversion from Parser resources to Puppet resources. We now copy over the 'exported' value. Signed-off-by: Luke Kanies <luke@madstop.com>
* Using Message acknowledgement in queueingLuke Kanies2009-06-031-2/+16
| | | | | | | | | This allows a more fine-grained load-balancing of the queue, which makes it easy to spin up multiple puppetqd instances and process the queues faster. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2315 - ca --generate works againLuke Kanies2009-06-031-11/+5
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* JRuby OpenSSL implementation is more strict than real ruby one andJames Turnbull2009-05-301-3/+3
| | | | requires certificate serial number to be strictly positive.
* Logging when a cached catalog is used.Luke Kanies2009-05-281-1/+3
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Changing Puppet::Cacher::Expirer#expired? method nameLuke Kanies2009-05-282-5/+5
| | | | | | | | | This method name clashed with Puppet::Indirector::Envelope#expired?, and its name wasn't actually very appropriate. The new method name is 'dependent_data_expired?'. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2240 - external node failures now log outputLuke Kanies2009-05-281-1/+6
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2237 - client_yaml dir is always created by puppetdLuke Kanies2009-05-281-0/+6
| | | | | | | This is just a simple call to Puppet.use in the puppetd setup method. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2228 - --logdest works again in puppetd and puppetmasterdLuke Kanies2009-05-272-0/+35
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing puppetmasterd tests when missing rackLuke Kanies2009-05-271-1/+5
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing the Agent so puppetrun actually works server-sideLuke Kanies2009-05-271-0/+8
| | | | | | | We weren't correctly propagating options through to the Configurer instance. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2248 - --no-client correctly leaves off clientLuke Kanies2009-05-271-1/+8
| | | | | | | All of the settings were there, we just weren't doing anything about them. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2243 - puppetrun works againLuke Kanies2009-05-271-0/+12
| | | | | | | | The problem was that some defaults were nil but had to be 'false', because xmlrpc can't serialize 'nil' as an rpc argument. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #2280 - Detailed exit codes fixJames Turnbull2009-05-271-1/+35
|
* Refactoring resource generation slightlyLuke Kanies2009-05-261-0/+1
| | | | | | | | | | | I found some cases where duplicate resources weren't correctly skipped, but I couldn't get the test to really demonstrate them. The code at least is demonstrated to work, anyway. Signed-off-by: Luke Kanies <luke@madstop.com>
* Not trying to load files that get removed in pluginsyncingLuke Kanies2009-05-261-0/+12
| | | | | | | Previously any changed file got loaded; now we only try to load files that are still present. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2288 - fixing the tests broken by my attr_ttl codeLuke Kanies2009-05-221-0/+9
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fix for #2234: test fails with old Rack versionChristian Hofstaedtler2009-05-203-4/+4
|
* Fixing #2273 - file purging works more intuitivelyLuke Kanies2009-05-202-17/+31
| | | | | | | | | | | | | | It now correctly purges files whether we're recursing locally or remotely. *Please* test various scenarios you can think of with this. I've tested: * Local recursion with no remote source * Remote recursion with a source * Recursion with an extra locally managed file Signed-off-by: Luke Kanies <luke@madstop.com>
* Caching whether named autoloaded files are missingLuke Kanies2009-05-202-1/+31
| | | | | | | | This is the big win, because it causes us to just skip the whole loading infrastructure, including skipping looking through the modulepath. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding caching of file metadata to the autoloaderLuke Kanies2009-05-202-2/+141
| | | | | | | | | | | The cache isn't actually used yet - this just adds all of the plumbing. It was found that stat'ing files that didn't exist could take up to 85% of a run, so this is progress toward getting rid of those stats. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding modulepath caching to the AutoloaderLuke Kanies2009-05-201-2/+48
| | | | | | | | | There's more caching to add, but this simplifies the interface to the list of paths and then caches that list so we aren't constantly searching the filesystem. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding caching to the Environment classLuke Kanies2009-05-201-0/+16
| | | | | | | | | | | Caching the module path (because we check which directories exist, and this method can get called often), and the complete list of modules. The cache ttl uses the filetimeout, which defaults to 15 seconds. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding TTL support to attribute cachingLuke Kanies2009-05-201-1/+53
| | | | | | | | | Previously you had to have an Expirer, but now you can declare a TTL for a cached attribute and it will be expired automatically when the cached value is older than the ttl. Signed-off-by: Luke Kanies <luke@madstop.com>
* Deprecating factsync - pluginsync should be used insteadLuke Kanies2009-05-201-0/+8
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Protecting Stomp client against internal failuresLuke Kanies2009-05-181-0/+5
| | | | | | | | Apparently the stomp client is really unhelpful with failures; this attempts to provide at least a bit more information. Signed-off-by: Luke Kanies <luke@madstop.com>
* Refactoring the stomp client and tests a bitLuke Kanies2009-05-181-32/+87
| | | | | | | | | | | | | The main goal of this refactor is to tell the client to be resilient to failures (configured at initialization time), and to send all messages as persistent messages (configured for each message). In the process, the client now parses the queue source URI and handles each argument separately. The tests are more thorough, also. Signed-off-by: Luke Kanies <luke@madstop.com>
* Relying on threads rather than sleeping for puppetqdLuke Kanies2009-05-181-2/+3
| | | | | | | | We previously manually slept, but this uses the queue client to handle keeping the process running, by just joining all running threads. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2250 - Missing templates throw a helpful errorLuke Kanies2009-05-182-15/+31
| | | | | | | | | | | This changes the behaviour of template searching a bit - we previously usually returned a file name, whether the template existed or not. Now we only return a path if it exists. Refactoring a few of the the tests for TemplateWrapper, also. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2273 - CA location is set correctly in puppetcaLuke Kanies2009-05-171-0/+6
| | | | | | It's set to 'only' instead of 'local'. Signed-off-by: Luke Kanies <luke@madstop.com>
* Modules now can find their own pathsLuke Kanies2009-05-154-82/+170
| | | | | | | | | | | | Previously, when you created a module you had to specify the path. Now Module instances can use the module path to look up their paths, and there are methods for determining whether the module is present (if the path is present). Also cleaned up the methods for figuring out what's in the module (plugins, etc.). Signed-off-by: Luke Kanies <luke@madstop.com>
* Moving file-searching code out of Puppet::ModuleLuke Kanies2009-05-153-181/+196
| | | | | | | | | | The Module class had a bunch of code for finding manifests and templates even when not in a module, and it complicated the class unnecessarily. This moves that code to a new, hackish-but-sufficient module for just that purpose. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2221 - pluginsignore should work againLuke Kanies2009-05-151-1/+7
| | | | | | | | We weren't splitting on whitespace, which is necessary since the settings don't support arrays but files expect them. Signed-off-by: Luke Kanies <luke@madstop.com>
* Confine stomp tests to Stomp enabled systemsBrice Figureau2009-05-151-0/+4
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix bug #2124 - ssh_authorized_key always changes target if target is not ↵Francois Deppierraz2009-05-151-1/+8
| | | | defined
* Fix #1409 once again, including testFrancois Deppierraz2009-05-061-0/+9
| | | | | | | "user doesn't exit" error appeared once again after the changes which were applied in order to fix #2004. Validation must only check attributes presence, not their value.
* Fixing #2200 - puppetqd expects Daemon to be a classLuke Kanies2009-05-041-0/+185
| | | | | | | | | | | I *swear* I wrote tests for the daemon, but I can't find them in any of my branches so I rewrote them. In the course of writing them, I also fixed the usage of Daemon. Signed-off-by: Luke Kanies <luke@madstop.com>