summaryrefslogtreecommitdiffstats
path: root/spec/integration
Commit message (Collapse)AuthorAgeFilesLines
* (#8663) Exclude git rev-parse HEAD spec test on WindowsJosh Cooper2011-08-191-1/+2
| | | | | | | | | | | | | | | | When running spec/integration/parser/compiler_spec.rb, the git command passed to Puppet::Util.execute is an array containing a single string ["git rev-parse HEAD"]. On Unix, it calls Kernel.exec(*command), but on Windows it calls Process.create(:command_line =>command), which attempts to execute the program called "git rev-parse HEAD" and fails: CreateProcess() failed: The system cannot find the file specified. This commit marks the test as fails_on_windows, and will be re-enabled when #8410 is fixed. Reviewed-by: Nick Lewis <nick@puppetlabs.com> (cherry picked from commit 7ca187509ce954e5b2707212a5615dbb9eb20378)
* Check for the appropriate permissions in File type tests on WindowsJacob Helwig2011-08-191-6/+8
| | | | | | | | | | | | | | Ruby's interface to the permissions on Windows does not map well to the *nix concept of User, Group, and Other. On Windows directories don't get the execute bit, and Ruby cannot manage group, and other via the standard chmod interfaces. Because of this, we no longer check that the execute bit is set on Windows, and use a permission set that will show differences if we fail to set the permissions on Windows. Reviewed-by: Nick Lewis <nick@puppetlabs.com> (cherry picked from commit 447c1171845d8d17e4e684c9508fddecc003d15e)
* Remove :fails_on_windows from file type tests that no longer fail on WindowsJacob Helwig2011-08-191-7/+5
| | | | | | | | | With the previous changes to the file bucket and the handling of what is considered an absolute path, enough pieces have slid into place that the file type is now mostly working on Windows. Reviewed-by: Nick Lewis <nick@puppetlabs.com> (cherry picked from commit 6385e08004ff06b709cc874870de38c078adb791)
* Disable symlink related file tests on WindowsJacob Helwig2011-08-191-2/+2
| | | | | | | | While Windows filesystems typically have support for symlinks (NTFS), there are no immediate plans to support symlinks on Windows. Reviewed-by: Nick Lewis <nick@puppetlabs.com> (cherry picked from commit 207d41f798356d7001f5de971e118e3c33d5f6d1)
* (#8663) Disable spec tests for unsupported functionality on WindowsJosh Cooper2011-08-193-3/+3
| | | | | | | | | | | | | | | The mount, shell, and ssh_authorized_key types are not supported on Windows, so these spec tests have been disabled when running on Windows. One of the compiler spec tests fails on Windows because Puppet::Util.execute attempts to execute a program named "git rev-parse HEAD". This has different semantics than Unix, where the command is splatted, Kernel.exec(*command). Since this truly is a Windows bug, I removed the fails_on_windows tag and updated ticket #8410. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit d9ce88d10707268fe41c8f3ad1166137fe8e202f)
* (#8663) Reenable spec tests on Windows that now passJosh Cooper2011-08-192-2/+2
| | | | | | | | | The cacher was causing spec tests to fail due to Time.now not having millisecond resolution on Windows. Now that usage of the cacher has been removed from many places, these tests now pass. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit 9e502ed121847fe4fcca90453c0520b53103d17d)
* Fix issue with forward and backslashes in Windows pathsJosh Cooper2011-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The environment validates its modulepath and manifestdir settings, but it uses Dir.getwd to convert a relative path into an absolute path. The problem is that on Windows, Dir.getwd returns a path with backslashes. (Interestingly this only happens when puppet is loaded, not in irb for example.) And since we do not yet support backslashes in Windows paths or UNC paths, the directory is not included in the environment. For the time being, I am using File.expand_path to normalize the path. It has the side-effect of converting backslashes to forward slashes. This is sufficient to work around backslashes in Dir.getwd. In the near future, I will be refactoring how paths are split, validated, tested, etc, and I have a REMIND in place to fix the environment. But as a result of this change it exposed a bug in our rdoc parser dealing with the finding the root of a path. The parser assumed that the root was '/', but caused an infinite loop when passed a Windows path. I added a test for this case, which is only run on Windows, because on Unix File.dirname("C:/") == '.'. After all of that, I had to disable one of the rdoc spec tests, because it attempted to reproduce a specific bug, which caused rdoc to try to create a directory of the form: C:/.../files/C:/.... Of course, this fails because ':' is not a valid filename character on Windows. Paired-with: Nick Lewis <nick@puppetlabs.com> Reviewed-by: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit 9279d0954eb20d75e18a666fd572b5492e157608)
* Disable spec tests for unsupported functionality on WindowsJosh Cooper2011-08-193-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby does not support creating symlinks on Windows (though Windows does support them), and since the tidy spec test is designed to reproduce a specific bug (as opposed to testing symlink functionality on Windows) it has been disabled. Ruby on Windows also does not support File.chmod, so the inspect spec test has been disabled. The general issue of File.chmod on Windows is something I know needs to be investigated. Also disabled the cron spec test as this functionality will not be supported on Windows (instead there will be task manager support). Re-enable the autoload spec tests as those now pass on Windows (this is probably due to the cacher changes recently made). The inventory ssl spec is not supported on Windows and so is disabled. However, while researching the failure, it was due to Time.now.strftime("%Z") returning "Pacific Daylight Time" on Windows, instead of "PDT" like it does on other platforms. As a result, the split method was sometimes splitting in the wrong place. As far as I can tell, the inventory code is only called from the CA (to keep track of serial numbers for certs that it has issued). But it's something to watch out for on Windows when calling strftime. Webrick, fileserver and CA functionality are not supported on Windows so these spec tests are disabled. Also fix path issue with catalog spec. Also several spec tests were creating tempfiles manually and calling system("rm -rf ..."), these have been replaced with PuppetSpec::Files.tmpdir. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit 75d2e62cab1de7677463c274892f8920cb7e0cbf)
* Update certificate spec tests for WindowsJosh Cooper2011-08-194-32/+25
| | | | | | | | | | | | | | | | | | | Disable CA related spec tests on Windows, since that functionality is not supported. Some cert spec tests are still marked as fails_on_windows because settings attempts to create and apply a catalog corresponding to ssl/cert related directories. This fails because on Windows Puppet.features.root? always returns true (which is a separate bug), and as a result attempts to set the owner and group, which fails because the provider is not implemented yet on Windows. Also many of these tests were using Tempfile.new and trying to system("rm -rf ...") later. I changed these to use PuppetSpec::Files.tmpdir instead, which automatically cleans up temporary directories after the tests have run. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit 95837e6d3e74648617c308aedc52192bb13fde5a)
* Rework Puppet::Util::Cacher to only expire using TTLsNick Lewis2011-08-197-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | We have removed every usage of cached_attr in which the attribute needs to be manually expired. Thus, the only meaningful behavior provided by Puppet::Util::Cacher is expiration based on TTLs. This commit reworks the cacher to only support that behavior. Rather than accepting an options hash, of which :ttl is the only available option, cached_attr now requires a second argument, which is the TTL. TTLs are now used to compute expirations, which are stored and used for expiring values. Previously, we stored a timestamp and used it and the TTL to determine whether the attribute was expired. This had the potentially undesirable side effect that the lifetime of a cached attribute could be extended after its insertion by modifying the TTL setting for the cache. Now, the lifetime of an attribute is determined when it is set, and is thereafter immutable, aside from deliberately re-setting the expiration for that particular attribute. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit d198fedf65e472b384666fc9ae3bef487852068a) Conflicts: spec/integration/node/facts_spec.rb spec/unit/node_spec.rb
* Remove Puppet::Util::Cacher use from Puppet::Indirector::IndirectionNick Lewis2011-08-192-4/+4
| | | | | | | | | | Previously, indirections were storing their termini in a cached_attr, so that they could be easily cleared for tests. Because this provides no value outside of testing, we instead simply create an attr_reader for termini, and expire them manually in tests. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit e74090468192697a6a2447dc6fcece3dd09a46f1)
* Remove Util::Cacher usage from SSL::CertificateAuthorityNick Lewis2011-08-191-2/+0
| | | | | | | | | | Allowing the singleton_instance value to be expirable is unnecessary, because there will never be a need for a different CA instance in the lifetime of a master. Additionally, the master never expired its cache anyway. This was only using the cacher so it could be expired for tests, so it can safely be removed. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit fac867c7bdbfbd431b089eb1bfb6eb73230e912c)
* Remove use of Util::Cacher in FileServing::ConfigurationNick Lewis2011-08-191-1/+1
| | | | | | | | | | This class was using Util::Cacher for its singleton instance, when that was unnecessary. The FileServing::Configuration instance already manages whether or not to reparse its config file, based on whether it has changed. Thus, there is no need for it to be manually expired via the cacher. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit 4bad729f56c26d8154cd0f20614fa4e478de9d40)
* Maint: Fix miscellaneous testsJosh Cooper2011-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | Several tests were broken due to pecularities of Windows and Ruby on Windows: * Ruby on windows does not differentiate between group and other file permissions. * All open file handles must be closed before the file can be deleted * Sometimes the current working directory (Dir.getwd) is reported as C:/foo and other times as C:\\foo, which confuses the spec tests. * Ruby's sprintf formats floating point values differently on Windows vs Unix. The Windows exponent has an extra leading zero. * Needed to stub execution of security command with the SMF service provider. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit 0e4ae653c0628cb0df9ccace98bca4bc7478fb7c)
* Maint: Tagged spec tests that are known to fail on WindowsJosh Cooper2011-08-1918-30/+30
| | | | | | | | | | | | | | | | | Many spec tests fail on Windows because there are no default providers implemented for Windows yet. Several others are failing due to Puppet::Util::Cacher not working correctly, so for now the tests that are known to fail are marked with :fails_on_windows => true. To skip these tests, you can run: rspec --tag ~fails_on_windows spec Reviewed-by: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit 255c5b4663bd389d2c87a2d39ec350034421a6f0) Conflicts: spec/unit/resource/catalog_spec.rb
* Fix tests with "relative" paths on WindowsJosh Cooper2011-08-193-17/+17
| | | | | | | | | | | | | | | | | | Absolute paths on Unix, e.g. /foo/bar, are not absolute on Windows, which breaks many test cases. This commit adds a method to PuppetSpec::Files.make_absolute that makes the path absolute in test cases. On Unix (Puppet.features.posix?) it is a no-op. On Windows, (Puppet.features.microsoft_windows?) the drive from the current working directory is prepended. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit 462a95e3d077b1915a919399b846068816c84583) Conflicts: spec/unit/parser/functions/extlookup_spec.rb
* (#8356) Color defaults to false on WindowsJosh Cooper2011-08-191-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> (cherry picked from commit d7d384ec0b7f28a8f0be20defcc2eebd0550aff0)
* maint: remove inaccurate copyright and license statements.Daniel Pittman2011-08-1814-56/+0
| | | | | | | | | | | For a while Luke, and other authors, injected a created tag, copyright statement, and "All rights reserved" into every new file they added to the Puppet project. This isn't really true, and we have a global license covering the code, so we have now stripped out all those old tags. Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
* Do not leak indirector state from apply testsJacob Helwig2011-08-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the indirector state persists across tests, we were seeing order dependent test failures with tests that assumed the default indirector settings. Specifically, if the following tests were run in order, the first would cause failures in the second two: spec/unit/application/apply_spec.rb spec/unit/node_spec.rb spec/integration/node_spec.rb To protect against this state leakage, we now: - reset the Puppet::Node terminus before each test in spec/integration/node_spec.rb to ensure we are testing a clean environment. - reset the Puppet::Node, and Puppet::Node::Facts terminus, and cache class after each test in spec/unit/application/apply_spec.rb to prevent leakage into other tests. Since the cache class has the same state leakage problem as the terminus class, but does not have the same ability to lazily populate the default when set to nil, we remove the test. Testing the default for the cache class would require running the test before all other tests to ensure there is no state pollution.n
* (#1886) Clean up `node clean` for merge.Pieter van de Bruggen2011-07-281-1/+1
| | | | | This includes various style changes, and assorted fixes to testing. Paired-With: Matt Robinson
* Deprecate RestAuthConfig#allowed? in favor of #check_authorizationBrice Figureau2011-07-261-1/+1
| | | | | | | | | | | | | | | | | #allowed? was a poorly named method since it isn't actually a predicate method. Instead of returning a boolean, this methods throws an exception when the access is denied (in order to keep the full context of what ACE triggered the deny). Given that #allowed? was overriding the behavior from AuthConfig, we leave a version of #allowed? in place that will issue a deprecation warning before delegating to #check_authorization. Once support for XML-RPC agents is removed from the master, we will be able to remove this delegation, since there should no longer be a reason for a distinction between AuthConfig and RestAuthConfig. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com> Signed-off-by: Jacob Helwig <jacob@puppetlabs.com>
* Fix #6026 - security file should support inline commentsBrice Figureau2011-07-261-1/+0
| | | | | | | | Auth.conf, namespaceauth.conf and fileserver.conf were not supporting trailing inlined comments. Also this commit fixes some indentation and error management. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #5010 - Allow leading whitespace in auth.confBrice Figureau2011-07-261-1/+0
| | | | | | | The regex used to detect ACE is too lax and would allow trailing spaces to sneak in, which in turn would confuse the ACE parser. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #5777 - rule interpolation broke auth.conf CIDR rulesBrice Figureau2011-07-261-0/+147
| | | | | | | | | | | Due to the interpolation performed to support regex back-references, various type of rules (mainly IP CIDR notations and wildcard hosts) were not working anymore. This patch adds an auth.conf integration test that covers most of the various rules types. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* (#8147) Update test for default reporturlnfagerlund2011-06-291-1/+1
| | | | | | | Edit test to accomodate the default URL change made in commit f6882d6d5779883e931a6f558c06f631098011c5. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
* Merge branch '2.6.x' into 2.7.xJacob Helwig2011-06-281-0/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * (#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>
* | 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>
* | Merge branch '2.6.x' into 2.7.xNick Lewis2011-06-081-0/+22
|\| | | | | | | | | | | | | | | | | | | | | 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
| * (#2128) Add support for setting node name based on a factNick Lewis2011-06-061-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) Add the ability to specify a node nameNick Lewis2011-06-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fixed #7166 - Replaced deprecated stomp "send" method with "publish"James Turnbull2011-04-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | The "send" method in the stomp gem has been deprecated since: http://gitorious.org/stomp/mainline/commit/d542a976028cb4c5badcbb69e3383e746721e44c It's been replaced with the "publish" method. Also renamed the send_message method to publish_message more in keeping with language used in queuing.
* | (#7507) Add exclude filter for ruby 1.9 spec failuresJosh Cooper2011-05-201-2/+2
| | | | | | | | | | | | | | Exclude spec test for multiple writer processes as this fails intermittently on ruby 1.9. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* | (#7502) Fixed parser spec for ruby 1.8.5Josh Cooper2011-05-201-2/+2
| | | | | | | | | | | | | | The first method is not available on Enumerable in ruby 1.8.5, so when it is mixed into ASTArray, you can't call first. Reviewed-By: Matt Robinson <matt@puppetlabs.com>
* | Merge branch 'ticket/2.7.next/7523' into 2.7.nextNick Lewis2011-05-171-0/+31
|\ \
| * | (#7523) Refactor the grammar to reduce duplicationNick Lewis2011-05-171-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit unifies some paths in the grammar, which had previously been duplicated to avoid shift/reduce conflicts. Merging these paths together and separating only the conflicting structures leads to a cleaner grammar, with fewer holes. Several bugs are fixed as a result: (#3129) Nested class names beginning with numbers work correctly (#5268) Hyphens in class names work correctly (#5817) Hashes and arrays can now be passed to functions (hashes require parentheses) Additionally, expressions are now legal in most places where they would make sense, when previously only bare rvalues were allowed. Paired-With: Markus Roberts Reviewed-By: Matt Robinson
* | | Merge branch '2.7.x' into 2.7.nextPieter van de Bruggen2011-05-179-10/+10
|\ \ \ | |/ / |/| |
| * | (#7507) Add more filters for Ruby 1.9 spec failuresPieter van de Bruggen2011-05-171-1/+1
| | | | | | | | | Paired-With: Matt Robinson
| * | (#7507) Add ability to filter Ruby 1.9 spec failuresMatt Robinson2011-05-178-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By running: rspec spec --tag ~@fails_on_ruby_1.9.2 We can now just run the specs that pass under Ruby 1.9. Obviously in the long term we want to have all the specs passing, but until then we need notification when we regress. From now on new code will be required to pass under Ruby 1.9, and Jenkins will give us email notification if it doesn't or if we break something that was already working. Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
* | | (#7114) Add integration tests for authorized_keyStefan Schulte2011-05-161-0/+207
|/ / | | | | | | | | | | | | | | Add tests to show the issue that one key is not moved from one keyfile to another keyfile if target is not in sync. Reviewed-By: Nick Lewis Reviewed-By: Josh Cooper
* | (#6962) Add integration tests on Face documentation.Daniel Pittman2011-04-271-0/+55
| | | | | | | | | | | | | | | | | | | | We now run all the faces, and their actions, as well as global help through the wringer in this test: this way we can be confident that we have, at least, the ability to generate the help without a user-visible failure. We also check that we have set copyright and license terms in our own faces. Theoretically this might fail if the end user has extra faces on LOAD_PATH, but my hope is that we won't hit that...
* | maint: use the exit_with helper everywhere...Daniel Pittman2011-04-222-4/+4
| | | | | | | | | | | | | | Now we have the exit_with matcher, we should use it everywhere that we previously stubbed, expected, or caught the exit status in an ad-hoc way. Reviewed-By: Jesse Wolf <jesse@puppetlabs.com>
* | Fixed #7166 - Replaced deprecated stomp "send" method with "publish"James Turnbull2011-04-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | The "send" method in the stomp gem has been deprecated since: http://gitorious.org/stomp/mainline/commit/d542a976028cb4c5badcbb69e3383e746721e44c It's been replaced with the "publish" method. Also renamed the send_message method to publish_message more in keeping with language used in queuing.
* | Merge remote-tracking branch 'community/feature/puppet-device' into 2.7.xPieter van de Bruggen2011-04-181-0/+56
| | | | | | | | Reviewed-By: Mike Stahnke
* | maint: clean up the spec test headers in bulk.Daniel Pittman2011-04-1351-85/+50
| | | | | | | | | | | | | | We now use a shebang of: #!/usr/bin/env rspec This enables the direct execution of spec tests again, which was lost earlier during the transition to more directly using the rspec2 runtime environment.
* | maint: just require 'spec_helper', thanks rspec2Daniel Pittman2011-04-0851-54/+52
| | | | | | | | | | | | | | | | | | | | | | rspec2 automatically sets a bunch of load-path stuff we were by hand, so we can just stop. As a side-effect we can now avoid a whole pile of stupid things to try and include the spec_helper.rb file... ...and then we can stop protecting spec_helper from evaluating twice, since we now require it with a consistent name. Yay. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
* | maint: Get tests passing on Ruby < 1.8.7Matt Robinson2011-04-081-1/+1
| | | | | | | | | | | | | | | | Fixing test errors: wrong argument type Symbol (expected Proc) undefined method `lines' for #<Array:0x1020823e0> Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | Merge branch '2.6.x' into nextMax Martin2011-04-071-27/+34
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.x: (maint) Indentation fixes (#6490) Add plugin initialization callback system to core Fix #4339 - Locally save the last report to $lastrunreport Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yaml Fixed #3127 - removed legacy debug code Fixed #3127 - Fixed gem selection regex (#5437) Invalidate cached TypeCollection when there was an error parsing (#6937) Adjust formatting of recurse's desc (#6937) Document the recurse parameter of File type. (#6893) Document the cron type in the case of specials. (#5670) Don't trigger refresh from a failed resource Fixed #6554 - Missing $haveftool if/else conditional in install.rb breaking Ruby 1.9 Conflicts (Manually resolved): lib/puppet/application/agent.rb lib/puppet/application/apply.rb lib/puppet/configurer.rb lib/puppet/resource/type_collection.rb lib/puppet/type/file.rb spec/integration/configurer_spec.rb spec/unit/application/agent_spec.rb spec/unit/application/apply_spec.rb spec/unit/configurer_spec.rb spec/unit/indirector/report/yaml_spec.rb spec/unit/resource/type_collection_spec.rb Paired-with: Nick Lewis
| * Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yamlBrice Figureau2011-04-051-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once a configuration run is done, puppetd will save on the node a yaml summary report roughly akin to: --- time: notify: 0.001025 last_run: 1289561427 schedule: 0.00071 config_retrieval: 0.039518 filebucket: 0.000126 resources: changed: 1 total: 8 out_of_sync: 1 events: total: 1 success: 1 changes: total: 1 This is almost an hash version of the current --summarize output, with the notable exception that the time section includes the last run unix timestamp. The whole idea is to be able to monitor locally if a puppetd does its job. For instance this could be used in a nagios check or to send an SNMP trap. The last_run information might help detect staleness, and this summary can also be used for performance monitoring (ie time section). The resource section can also show the number of failed resources. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * (#5670) Don't trigger refresh from a failed resourceNick Lewis2011-03-301-27/+34
| | | | | | | | | | | | | | | | Resources were triggering their subscribing/notified resources when they failed, which is incorrect. Now, events are only queued if the resource was successful. Paired-With: Max Martin