summaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | Adding Scope#each methodLuke Kanies2011-07-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The capability was already there via to_hash, and Enumerable was already included, but this method was missing. Given the kind of hacking RI is doing, this seemed appropriate. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | | | | Adding Scope#include? methodLuke Kanies2011-07-151-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is primarily for Hiera/DataLibrary support, but is a decent idea regardless. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | | | | Resource type defaults cleanupLuke Kanies2011-07-153-23/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is again done to make support for hiera easier. The way we were handling lookup of resource defaults was over-complicated. This does a decent bit of cleanup overall, but primarily focused on resource type defaults and how they get set during compilation. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | | | | Adding default environment to ScopeLuke Kanies2011-07-151-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were previously not defaulting to an environment, which is silly given that there's always a default. It just made setup code harder. We now default to the default environment. This makes further testing involving scopes much easier. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | | | | Adding []/[]= support to ScopeLuke Kanies2011-07-1510-103/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interface to scope is much clearer this way anyway, but this is needed to integrate Puppet with Hiera[1]. It just provides hash-like behavior to Scope, which Hiera and others can now easily rely on. I also went through all of the code that used Scope#lookupvar and Scope#setvar and changed it if possible, and at the same time cleaned up a lot of tests that were unnecessarily stubbing (and thus making it difficult to tell if I had actually broken anything). 1 - https://github.com/ripienaar/hiera Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | | | | (#7080) Registering PSON document typesLuke Kanies2011-07-152-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were originally using the actual constant for both Indirector Requests and Nodes, and this registers their document types as symbolic names. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | | | | Switching to use of json matchersLuke Kanies2011-07-152-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is only in the Node and Indirection::Request code. It makes the tests much simpler. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | | | | Making Fact json handling more resilientLuke Kanies2011-07-151-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were failing if any values were nil, and values were often nil, at least in testing. We now only include non-nil values, and we handle nil values just fine. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | | | | Adding json support to Puppet::NodeLuke Kanies2011-07-151-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Daniel Pittman <daniel@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com> Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* | | | | | (7080) Adding json support to Indirector RequestLuke Kanies2011-07-151-0/+99
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll be using this to do RPC over mcollective. Reviewed-by: Daniel Pittman <daniel@puppetlabs.com> Reviewed-by: Nick Lewis <nick@puppetlabs.com> Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* | | | | (#8268) Fix resource harness spec testsJosh Cooper2011-07-121-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The windows file type requires that the path start with either a drive letter or UNC style path. Also Ruby's File implementation on windows only supports 0644 and 0444 permission bits (it doesn't differentiate between group and other, and it doesn't know about the execute bit). This commit maps the path and permissions used in the test to sensible values when running on windows. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
* | | | | (#8356) Color defaults to false on WindowsJosh Cooper2011-07-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows consoles do not support ansi escape sequences for colorizing output. This commit changes the default setting of 'color' to false when the "microsoft_windows" feature is present. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
* | | | | Disable the master on Windows instead of blowing up with failed resourcesJacob Helwig2011-07-081-1/+6
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running the Puppet master on Windows is not supported, so instead of failing with what can be cryptic error messages about failed resources we fail with an explicit error message about the master on Windows not being supported. This way a user isn't mistakenly given the impression that running a master on Windows will work, and they just have something mis-configured. Signed-off-by: Jacob Helwig <jacob@puppetlabs.com> Reviewed-by: Max Martin <max@puppetlabs.com>
* | | | Merge branch '2.7.x'Jacob Helwig2011-06-281-2/+2
|\| | | | | | | | | | | | | | | | | | | * 2.7.x: Update configurer_spec.rb to work with Ruby 1.8.5
| * | | Update configurer_spec.rb to work with Ruby 1.8.5Jacob Helwig2011-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby 1.8.5 doesn't have start_with? on String, so instead of checking the log message using start_with? we check using a regex. Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | | Merge branch '2.7.x'Jacob Helwig2011-06-2810-57/+271
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7.x: (23 commits) Clean up indentation, whitespace, and commented out code Remove order dependency from functions integration spec (#7956) Porting cron tests (#7956) Port resource acceptance tests (#8048) Gem install puppet no longer fails if rdoc enabled. Updating for 2.7.1 release. (#8048) Gem install puppet no longer fails if rdoc enabled. Readying for release of 2.6.9 Updating CHANGELOG for 2.7.0 (#6854) Update Red Hat spec file Bumping release in lib/puppet.rb and updating CHANGELOG. Bumping RPM spec file to 2.6.9rc1. (#7224) Reword 'hostname was not match' error message (#7224) Add a helper to Puppet::SSL::Certificate to retrieve alternate names (#7506) Organize READMEs; specify supported Ruby versions in README.md (#7506) Specify supported Ruby versions in README.md (#5641) Help text: document that puppet doc takes modulepath, manifestdir, and environment options (#6418) Make test 64118 more portable (#7127) Stop puppet if a prerun command fails Do not needlessly create multiple reports when creating a transaction ...
| * | | Merge branch '2.6.x' into 2.7.xJacob Helwig2011-06-286-50/+202
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.x: (#7956) Porting cron tests (#7956) Port resource acceptance tests Readying for release of 2.6.9 (#6854) Update Red Hat spec file Bumping release in lib/puppet.rb and updating CHANGELOG. Bumping RPM spec file to 2.6.9rc1. (#7506) Organize READMEs; specify supported Ruby versions in README.md (#6418) Make test 64118 more portable (#7127) Stop puppet if a prerun command fails Do not needlessly create multiple reports when creating a transaction (#4416) Ensure types are providified after reloading (#4416) Always remove old provider before recreating it Cleanup indentation, comment, and unused code Conflicts: CHANGELOG README.md conf/redhat/puppet.spec lib/puppet.rb lib/puppet/transaction.rb spec/unit/configurer_spec.rb spec/unit/transaction_spec.rb
| | * | (#7127) Stop puppet if a prerun command failsJosh Cooper2011-06-102-46/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change there were several problems with pre and post run commands, logging, and sending of reports. 1. If a prerun command failed, puppet would attempt to apply the catalog. Now puppet will not apply the catalog, but it will run the postrun command and send the report (as it did before). 2. If a postrun command failed, puppet would not send the report. Sending the report is now in an outer ensure block from the postrun command, so postrun failures won't prevent the report from being sent. 3. Errors, e.g. Puppet.err, occuring during the prepare step, which which includes plugin/fact download and prerun commands were not appended to the report. Now the report log destination is registered as early as possible, and unregistered as late as possible to ensure Configurer errors that occur in the run method are included in the report. 4. The transaction was closing the Configurer's report destination out from underneath it. As a result, postrun errors were not included in the report. Paired-with: Nick Lewis <nick@puppetlabs.com> Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| | * | Do not needlessly create multiple reports when creating a transactionJosh Cooper2011-06-101-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the transaction would always create a report, which would some times be overridden with a new report. Now, the transaction optionally takes a report at initialization time, and only creates a report of its own if none was provided. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| | * | (#4416) Ensure types are providified after reloadingNick Lewis2011-06-101-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the 'provider' parameter for a type was only added when creating a provider for that type. This would cause a type to forget about its 'provider' parameter when only the type was reloaded. This was manifesting itself in pluginsync, when a provider plugin would be loaded before its type, causing the type to be autoloaded. The type plugin would then be loaded again by the plugin handler. Because the type => provider information is stored separately from the type, the providers don't need to be reloaded, and thus don't recreate the type's 'provider' parameter. Now we always "providify" the type (add its 'provider' parameter) upon creation, after trying to load its providers, if any providers are present. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
| | * | (#4416) Always remove old provider before recreating itNick Lewis2011-06-101-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case where provider class evaluation failed midway, the provider class would be created but not registered. Thus, when checking whether it should be removed, it wasn't found, and wasn't removed. This caused it to then fail to be recreated, because it collided with the existing class. Now we don't bother checking whether the provider is registered before we remove it, since rmclass has the appropriate checks to do the unregistration, and class removal safely. Removing a provider class that has been created but not registered should not be a problem since the only time this can happen is when the class is unusable because of parsing or other fatal errors in the provider itself. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
| * | | Remove order dependency from functions integration specJacob Helwig2011-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test in spec/integration/parser/functions_spec.rb would fail when the spec tests were run in the order (among other orderings): spec/unit/parser/functions/tag_spec.rb spec/unit/parser/templatewrapper_spec.rb spec/integration/parser/functions_spec.rb There are tests that would cause the "template" function to be loaded into the root environment. Puppet::Parser::Functions.function("template") would then detect its presence and P::P::F.rmfunction("template") would fail since #function(...) looks in more than just the current environment to see if a function is defined, while #rmfunction(...) only looks in the current environment to see if a function can be removed. In the test ordering specified earlier, tag_spec.rb would load the "template" function, and templatewrapper_spec.rb would create a current environment that would mask the root environment for #rmfunction(...), but not for #function(...) Since #rmfunction(...) only looks in the current environment, we should be using #functions.include?("template") since that matches the check that #rmfunction(...) itself uses. Paired-with: Nick Lewis <nick@puppetlabs.com>
| * | | (#8048) Gem install puppet no longer fails if rdoc enabled.Josh Cooper2011-06-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pre-released versions of faces may have used the "desc" option, which was later changed to "description", and an alias provided for "desc". The previous fix for 8048 removed this backwards compatibility (since it was never released to customers). This commit fixes the test case that assumed the "desc" option was still available. Reviewed-By: Daniel Pittman <daniel@puppetlabs.com>
| * | | (#7224) Reword 'hostname was not match' error messageNick Lewis2011-06-142-5/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This error message is grammatically incorrect and unhelpful, so we replace it with a message that explains more correctly what went wrong and what was expected. This message happens when making an authenticated connection to a server where the certificate doesn't match its hostname. This happens in the REST terminuses, so we wrap their HTTP methods with a helper that will catch the appropriate SSLError and re-raise it with the better message stating the hostname used, and the list of hostnames that we were expecting it to be a part of. Unfortunately, because the certificate in question isn't available at error time, we have to use the Net::HTTP#verify_callback to capture it. Paired-With: Jacob Helwig <jacob@puppetlabs.com> Reviewed-By: Dominic Maraglia <dominic@puppetlabs.com>
| * | | (#7224) Add a helper to Puppet::SSL::Certificate to retrieve alternate namesNick Lewis2011-06-141-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alternate names, if present, are specified in the subjectAltName extension of the certificate. The values are in the form: "DNS:alternate_name1, DNS:alternate_name2" This helper will retrieve the value of the subjectAltName extension and extract the alternate names, returning and empty list if the extension is absent. This will make it easier to access the entire list of possible names for a certificate, rather than just the common name; this is helpful for generating more detailed SSL error messages. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
* | | | Remove order dependency from functions integration specJacob Helwig2011-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test in spec/integration/parser/functions_spec.rb would fail when the spec tests were run in the order (among other orderings): spec/unit/parser/functions/tag_spec.rb spec/unit/parser/templatewrapper_spec.rb spec/integration/parser/functions_spec.rb There are tests that would cause the "template" function to be loaded into the root environment. Puppet::Parser::Functions.function("template") would then detect its presence and P::P::F.rmfunction("template") would fail since #function(...) looks in more than just the current environment to see if a function is defined, while #rmfunction(...) only looks in the current environment to see if a function can be removed. In the test ordering specified earlier, tag_spec.rb would load the "template" function, and templatewrapper_spec.rb would create a current environment that would mask the root environment for #rmfunction(...), but not for #function(...) Since #rmfunction(...) only looks in the current environment, we should be using #functions.include?("template") since that matches the check that #rmfunction(...) itself uses. Paired-with: Nick Lewis <nick@puppetlabs.com>
* | | | Merge branch '2.7.x'Nick Lewis2011-06-0811-421/+514
|\| | |
| * | | Merge branch '2.7rc' into 2.7.xNick Lewis2011-06-082-2/+34
| |\ \ \
| | * | | (#7828) Fix whitespace in synopsis generator.Daniel Pittman2011-06-071-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We accidentally omitted whitespace between multiple options while building the synopsis. This fixes that, by introducing a breakable space in the right location. Additionally, we extract the code that was 99 percent identical from the face and action synopsis generators, push it down into the documentation module, and then invoke it from both places. This eliminates the duplicate code, allowing me to fix that bug once and have it apply to both parts of the code; this is pretty much assured to be true any time we change the synopsis generation. Reviewed-By: Nick Fagerlund <nick.fagerlund@puppetlabs.com>
| | * | | maint: remove an unhelpful pending test.Daniel Pittman2011-06-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This has been pending approximately forever, and adds little value; removing the warning reduces noise without value.
| * | | | Merge branch '2.6.x' into 2.7.xNick Lewis2011-06-089-419/+480
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb lib/puppet/application/apply.rb lib/puppet/configurer.rb lib/puppet/configurer/fact_handler.rb spec/unit/application/apply_spec.rb spec/unit/configurer/fact_handler_spec.rb spec/unit/configurer_spec.rb
| | * | | (#650) Allow symlinks for configuration directoriesNick Lewis2011-06-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, pointing a setting like 'confdir' at a symlink to a directory would replace the symlink with a directory. This was because files created by settings implicitly managed links, rather than following them. This behavior is now changed so that file settings will follow links. The behavior of these symlinks is the same as any other file resource. That is, if the target of the symlink doesn't exist, Puppet will consider this an error. Similarly, if the target of the symlink is a file, then the symlink will still be replaced with a directory, rather than replacing its target. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com> Reviewed-By: Dominic Maraglia <dominic@puppetlabs.com>
| | * | | Merge branch 'ticket/2.6.x/2128' into 2.6.xNick Lewis2011-06-066-414/+465
| | |\ \ \
| | | * | | (#2128) Add support for setting node name based on a factNick Lewis2011-06-064-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the node_name_fact setting, which specifies a fact to use to determine the node name. This allows dynamically determining the node name without having to modify puppet.conf or command line options. Using this setting requires modifying auth.conf to allow nodes to request catalogs not matching their certnames. For example, this would allow any authenticated node to retrieve any catalog: # $confdir/auth.conf path ~ /catalog/.+ allow * The node_name_fact and node_name_value options are mutually exclusive, because it is ambiguous which setting should take precedence. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
| | | * | | (#2128) Get facts before retrieving catalogNick Lewis2011-06-061-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Retrieving a catalog and getting the facts to submit with the catalog request are distinct operations, and should be done separately. This is also to prepare for adding the ability to determine the node name based on a fact, in which case the node name needs to be determined before it is used for either the catalog or the report. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
| | | * | | (#2128) Add the ability to specify a node nameNick Lewis2011-06-065-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The setting node_name_value may now be used for 'puppet apply' or 'puppet agent' to specify the name for the node. This will not affect the certificate used by the node, and the node will still be authenticated based on its certname. The default value for node_name_value is the certname. This is useful for eg. EC2 nodes whose random hostnames cannot be easily used to classify them. Paired-With: Jacob Helwig
| | | * | | maint: Refactor specs in preparation for making node name more flexibleNick Lewis2011-06-024-413/+393
| | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | These tests were stubbing when it was unnecessary, so replace much of it with actual objects and files. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
| | * | | Merge branch ↵Ben Hughes2011-06-031-1/+1
| | |\ \ \ | | | |/ / | | |/| | | | | | | 'ticket/2.6.x/6885-puppet-agent-fingerprint-requires---verbose-to-return-a-value' into 2.6.x
| | | * | (#6885) puppet agent fingerprint requires --verbose to return a value.Ben Hughes2011-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always output the fingerprint to STDOUT, no matter what loglevel is used, as that's the whole purpose of the comment. Having to specify --verbose in addition to --fingerprint to get the finger is nonsensical. Update the spec test to stub @puppet puts, instead of the Puppet.logging facilities. Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
* | | | | Merge branch '2.7.x'Matt Robinson2011-06-061-1/+106
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7.x: (#7624) Manually fetch all properties in instances. (#7193) Fix path issues with acceptance tests that call old shell tests (#7632) Make secret_agent application compatible with secret_agent face (#7624) Auditing should not be enabled by default for purged resources. maint: Confine augeas specs to require the augeas feature (#2728) Add diff output for changes made by Augeas provider
| * | | | maint: Confine augeas specs to require the augeas featureNick Lewis2011-06-021-1/+1
| | | | |
| * | | | (#2728) Add diff output for changes made by Augeas providerMichael Knox2011-06-021-1/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Utilising Augeas's SAVE_NEWFILE mode (similar to augtool -n) to determine the changes that will be made be made by Augeas. Output a unified diff to info handle non-default root, and multiple files correctly Adding tests for Augeas diff functionality Add test for non-default :root when diff'ing Ensure that multiple files are diffed if changed, not just one Signed-off-by: Josh Cooper <josh@puppetlabs.com> Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* | | | | Merge branch '2.7.x'Max Martin2011-06-0210-44/+149
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7.x: (40 commits) (#7746) Fix bootstrap issues from #7717 fix. (#7683) Use ronn, when available, to render the output. (#7683) Add a 'man' face and subcommand to Puppet. maint: remove obsolete work-around code from help face. (#7699) Don't duplicate inherited action names on faces. (#7177) Deprecate implicit 'puppet apply' for 2.7.0 (#7717) Layout cleanup for subcommand extraction. #7211: Test unknown options don't shadow unknown actions. #7211: nasty logic error with global Face options taking arguments. #7211: more helpful error messages in various cases. maint: Fix order dependent test failure (#5966) Add support for hostname regular expressions in auth.conf (#7708) Delete extended documentation from configuration reference (#7707) Document signals in puppet agent and puppet master help add puppet master polling step for ticket 7117 (#5318) Always notice changes to manifests when compiling. (#5318) Always notice changes to manifests when compiling. (#7557) Remove Faces Application maint: Fix order dependent spec failure for face indirection (#7690) Don't blow up when listing terminuses available for faces ... Conflicts (resolved manually): acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb
| * | | | Merge branch '2.7rc' into 2.7.xMax Martin2011-06-025-32/+77
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7rc: (24 commits) (#7746) Fix bootstrap issues from #7717 fix. (#7683) Use ronn, when available, to render the output. (#7683) Add a 'man' face and subcommand to Puppet. maint: remove obsolete work-around code from help face. (#7699) Don't duplicate inherited action names on faces. (#7177) Deprecate implicit 'puppet apply' for 2.7.0 (#7717) Layout cleanup for subcommand extraction. #7211: Test unknown options don't shadow unknown actions. #7211: nasty logic error with global Face options taking arguments. #7211: more helpful error messages in various cases. (#7708) Delete extended documentation from configuration reference (#7707) Document signals in puppet agent and puppet master help add puppet master polling step for ticket 7117 (#5318) Always notice changes to manifests when compiling. (#7557) Remove Faces Application maint: Fix order dependent spec failure for face indirection (#7690) Don't blow up when listing terminuses available for faces maint: Dedup the loadpath so we don't have to walk it multiple times Maint: Fix ellipses for short descriptions (#7563) DRY: Remove indirector boilerplate from individual faces ... Conflicts (resolved manually): acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb lib/puppet/application/faces.rb lib/puppet/face/help/man.erb lib/puppet/indirector/face.rb spec/shared_behaviours/documentation_on_faces.rb
| | * | | (#7699) Don't duplicate inherited action names on faces.Daniel Pittman2011-06-011-12/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We earlier moved to duplicating Action objects in the Faces subsystem to ensure they had the correct binding context during execution and introspection. This was correct, but introduced a bug where we would report both the parent and child binding as separate entries with duplicate names, in the list of actions. This flowed on to the help output, where it would cause every inherited action to be listed twice: once on the parent, once on the child. (This was actually worse if the inheritance was deeper: we would duplicate once for every level between the instance and the origin of the action.)
| | * | | #7211: Test unknown options don't shadow unknown actions.Daniel Pittman2011-05-311-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unknown options used to shadow unknown actions: $ puppet node something_I_cannot_do --unknown-option Could not parse options: invalid option: --unknown-option The earlier changes have fixed this problem, but we now add extra testing to make sure that we don't regress to the earlier state of play.
| | * | | #7211: more helpful error messages in various cases.Daniel Pittman2011-05-312-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were emitting a bunch of unhelpful failure messages, surrounding invalid actions and especially default actions interacting with the command-line. This cleans those up, to give a helpful, informative, and correct message in all cases. Notably, we no longer report that there is no "default" action when you specify an unknown action on a face. This change revealed some other weaknesses in our unit tests, now correctly, that result in slightly more robust code.
| | * | | (#7557) Remove Faces ApplicationMatt Robinson2011-05-261-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It used to be that to list the faces available and their actions and options, you had this legacy based face application. This functionality has all been moved into the puppet help face application. Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
| | * | | maint: Fix order dependent spec failure for face indirectionMatt Robinson2011-05-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An indirected face is being created in spec/unit/application/indirection_base_spec.rb that uses a stubbed out indirection. This stub didn't have a name method defined, which caused the documentation_spec.rb, that does checks against every available face, to blow up with: expected no Exception, got #<NoMethodError: undefined method `to_sym' for nil:NilClass> in lib/puppet/face/indirector/face.rb when listing the indirections for the help text. I toyed with creating a real indirection for the test, but that was harder than expected. Paired-with: Max Martin <max@puppetlabs.com>
| | * | | (#7690) Don't blow up when listing terminuses available for facesMatt Robinson2011-05-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, in order to list the available terminuses for an indirected face we loaded all the the terminuses in order to list them. This meant that if a terminus like active_record didn't have the dependencies it needed, the documentation would raise errors and not list terminuses. <Puppet::Error: Could not autoload filename uninitialized constant Object::ActiveRecord> Now we just list the terminuses available in the load path without trying to load them. The terminus will still raise an error if you try to use it without its dependencies being met. Paired-with: Max Martin <max@puppetlabs.com>