summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | | maint: fix spec_helper inclusions again.Daniel Pittman2011-05-1717-45/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We got rid of the '../../spec_helper' style requires, but a few of them snuck back in in recent changes. This purges them out, replaced with the header: #!/usr/bin/env rspec require 'spec_helper' Reviewed-By: Nick Lewis <nick@puppetlabs.com>
| * | | | | | Adding a sleep state post starting masterDominic Maraglia2011-05-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Occasional spurious errors seen when running this test -- curl reports an SSL protocol error; I suspect this is actually a timing issue related to starting up the master and not being ready to to accecpt connections.
* | | | | | | Merge branch 'next'Pieter van de Bruggen2011-05-1785-314/+1026
|\| | | | | |
| * | | | | | Merge branch '2.7.next' into nextPieter van de Bruggen2011-05-1783-314/+694
| |\| | | | |
| | * | | | | Merge branch '2.7.x' into 2.7.nextPieter van de Bruggen2011-05-1775-203/+203
| | |\ \ \ \ \ | | | |/ / / / | | |/| | / / | | | | |/ / | | | |/| |
| | | * | | Merge branch 'tickets/2.7.x/7507' into 2.7.xPieter van de Bruggen2011-05-172-2/+2
| | | |\ \ \
| | | | * | | (#7507) Add more filters for Ruby 1.9 spec failuresPieter van de Bruggen2011-05-172-2/+2
| | | |/ / / | | | | | | | | | | | | Paired-With: Matt Robinson
| | | * | | Merge branch 'ticket/2.7.x/7507-filter_19_failures' into 2.7.xMatt Robinson2011-05-1763-189/+188
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.7.x/7507-filter_19_failures: (#7507) Add ability to filter Ruby 1.9 spec failures (#7507) Fix when_invoked action specs in Ruby 1.9
| | | | * | | (#7507) Add ability to filter Ruby 1.9 spec failuresMatt Robinson2011-05-1759-102/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | | * | | (#7507) Fix when_invoked action specs in Ruby 1.9Matt Robinson2011-05-174-87/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby 1.9 is strict about argument arity for methods that are metaprogrammatically defined. A ton of specs that were setting up when_invoked didn't pass options even though they should have been. Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
| | | * | | | Merge branch 'ticket/2.7.x/7297' into 2.7.xNick Lewis2011-05-161-1/+1
| | | |\ \ \ \
| | | | * | | | (#7297) Fix Puppet::Resource#to_manifest in Ruby 1.9Nick Lewis2011-05-161-1/+1
| | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method was relying on the implicit join in Ruby 1.8's Array#to_s, eg. [1,2,3].to_s => "123". The behavior in Ruby 1.9 is more akin to Array#inspect, eg. [1,2,3].to_s => "[1, 2, 3]". Since the array we were building was lines to be printed, the latter behavior is incorrect. So we just join into a single string, which prints consistently in all versions of Ruby. Paired-With: Josh Cooper Original patch by Aria Stewart <aredridel@nbtsc.org>
| | | * | | | Merge branch 'ticket/2.7.x/7298' into 2.7.xNick Lewis2011-05-161-0/+1
| | | |\ \ \ \ | | | | |/ / / | | | |/| | |
| | | | * | | (#7298) require 'English' to provide $CHILD_STATUS in Ruby 1.9Nick Lewis2011-05-161-0/+1
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This had been coming from 'cgi', but in Ruby 1.9, cgi no longer requires English. Since we use $CHILD_STATUS when execing, we need to have it available, so require it manually. This also provides the other named special globals, should we choose to use them. Paired-With: Josh Cooper
| | | * | | Merge branch 'ticket/2.7.x/7291-ruby19-fixes' into 2.7.xMatt Robinson2011-05-169-11/+11
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.7.x/7291-ruby19-fixes: (#7291) Fix issues with instance_methods in Ruby 1.9 (#7291) Fixed ascii problem with Ruby 1.9.2 (#7291) Fix Ruby 1.9 face failures (#7291) The 'script' version of actions needs options argument
| | | | * | | (#7291) Fix issues with instance_methods in Ruby 1.9Matt Robinson2011-05-165-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instance_methods in Ruby 1.8.7 returns an array of strings, but returns an array of symbols in 1.9.2. This manifested itself when running the tests because in 1.9.2 we were trying to call sub on a sybmol. The original proposed solution was to monkey patch symbols to have a sub method, but this didn't deal with the real issue of need to check whether a method was defined, and actually made it worse. Turns out that checking for the presence of a method in an array that may contain symbols and may contain strings is better done by just calling method_defined? instead. This patch addresses all the places ack turned up the code doing this include? check instead of directly calling method_defined?. Thanks to Alex Sharp ajsharp@gmail.com for pointing out the Ruby 1.9 problems and working toward a solution. Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| | | | * | | (#7291) Fixed ascii problem with Ruby 1.9.2Matt Robinson2011-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As with the previous commit, there was a problem loading a face because Ruby 1.9.2 doesn't like using non-standard ascii characters without declaring the encoding at the top of the file. SyntaxError Exception: /Users/matthewrobinson/work/puppet/lib/puppet/face/resource.rb:10: invalid multibyte char (US-ASCII) Rather than declare the encoding to allow the French word, I've translated it (after having to look it up myself). Reviewed-by: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | | * | | (#7291) Fix Ruby 1.9 face failuresMatt Robinson2011-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The certificate face wasn't being loaded, but it wasn't clear from the test failure why: lib/puppet/interface.rb:61:in `[]': Could not find Puppet Face :certificate (Puppet::Error) The problem is that when the certificate face is required you get: SyntaxError Exception: /Users/matthewrobinson/work/puppet/lib/puppet/face/certificate.rb:11: invalid multibyte char (US-ASCII) However this error is caught and logged, but then ignored. This behavior was a decision in #7314 and is currently under review. A space character in the description was ASCII 160 instead of the typical ASCII 32 Reviewed-by: Pieter van de Bruggen <pieter@puppetlabs.com>
| | | | * | | (#7291) The 'script' version of actions needs options argumentMatt Robinson2011-05-162-2/+2
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby 1.9 is stricter about arity for for arguments passed as a block. A test case just hadn't been updated to take this into account for Face scripts (a simpler form of action), which isn't surprising since script isn't used anywhere in the code, which makes it a prime candidate for removal as far as I'm concerned, but apparently Luke wants it in there. Reviewed-by: Pieter van de Bruggen <pieter@puppetlabs.com>
| | * | | | Merge branch 'ticket/2.7.next/7114' into 2.7.nextNick Lewis2011-05-165-108/+420
| | |\ \ \ \
| | | * | | | (#7114) Fix specs for ssh authorized key parsed providerNick Lewis2011-05-161-32/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests were unnecessarily creating a stub resource, as well as failing to re-initvars on the provider before each test. This led to test ordering failures, and incompatibilities with the other commits in this series. Now we use a real resource, and properly reinitialize before each test. Paired-With: Josh Cooper
| | | * | | | (#7114) Target returns correct valueStefan Schulte2011-05-161-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the ssh_authorized_key parsedfile provider to return the current target value instead of the should value. Without this change puppet always thinks that the target property is in sync and thus will never move one key to the correct file. Reviewed-By: Nick Lewis Reviewed-By: Josh Cooper
| | | * | | | (#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
| | | * | | | (#7114) Improve unit tests for ssh_authorized_keyStefan Schulte2011-05-161-70/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tests to check if the type supports valid values for all the properties. Also check if the type rejects values that are invalid. Reviewed-By: Nick Lewis Reviewed-By: Josh Cooper
| | | * | | | (#7114) Improve value validation for authorized_keyStefan Schulte2011-05-161-0/+12
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whitespaces in any of the properties can lead to incorrect entries in the authorized_keys file. Reviewed-By: Nick Lewis Reviewed-By: Josh Cooper
| | * | | | Merge branch 'ticket/2.7.x/7300' into 2.7.nextNick Lewis2011-05-162-0/+59
| | |\ \ \ \
| | | * | | | (#7300) Fix instances method of mount providerStefan Schulte2011-05-161-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The instance method now behaves like the prefetch method: After parsing /etc/(v)fstab run mount to update the ensure state from either :unmounted to :mounted and from :absent to :ghost Reviewed-By: Nick Lewis Reviewed-By: Josh Cooper
| | | * | | | (#7300) Add specs for the mount providerStefan Schulte2011-05-011-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add specs to demonstrate that the instances method is currently broken because it does not take the actual mountstate into account. As a result running "puppet resource mount" on the commandline will report every mount that appears in /etc/(v)fstab as unmounted.
| | * | | | | Merge branch ↵Jacob Helwig2011-05-162-3/+12
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'tickets/2.7.x/7259-make-active-record-test-requirement-optional' into 2.7.next * tickets/2.7.x/7259-make-active-record-test-requirement-optional: (#7259) Remove ActiveRecord requirement from indirector face spec (#7259) Do not try to load all Terminus classes when configuring the Indirector
| | | * | | | | (#7259) Remove ActiveRecord requirement from indirector face specJacob Helwig2011-05-161-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "should be able to return a list of terminuses for a given indirection" was calling Puppet::Indirector::Face.terminus_classes, which is just a thin wrapper around Puppet::Indirector::Terminus.terminus_classes, which would attempt to load all Terminus classes. This would cause problems if not all of the prerequisites for all of the Terminus classes were installed (For example: ActiveRecord). Now we only test that the thin wrapper appropriately munges the output from Puppet::Indirector::Terminus.terminus_classes, since the method being wrapped should have its own tests for the behavior that was being tested originally. Paired-with: Nick Lewis <nick@puppetlabs.com>
| | | * | | | | (#7259) Do not try to load all Terminus classes when configuring the IndirectorJacob Helwig2011-05-161-1/+1
| | | | |/ / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When configuring the Indirector routes, we should only try loading the Terminus classes that are referenced by the configuration. Previously, we were loading all Terminus classes, which would cause errors if we didn't have all of the prerequisites for all of them, even if the ones with missing prerequisites weren't being used by the configuration. Paired-with: Nick Lewis <nick@puppetlabs.com>
| * | | | | | Merge branch 'ticket/next/1853-pacman-provider' into nextMax Martin2011-05-162-0/+332
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/next/1853-pacman-provider: (#1853) Pacman package provider (#1853) Pacman package provider
| | * | | | | | (#1853) Pacman package providerPaul Boyd2011-05-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stub the command method, so it doesn't give an error.
| | * | | | | | (#1853) Pacman package providerPaul Boyd2011-05-162-0/+331
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for use Archlinux's pacman package manager in Puppet. Originally written by Miah Johnson, with bug fixes from Thomas Hatch and myself.
* | | | | | | Merge branch 'next'Matt Robinson2011-05-137-157/+29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * next: Revert "(#7220) Add the ability to "inherit" options." (#7469) Add license to test face so tests pass (#7264) Docs: Clarify that subscribe/notify imply require/before (#7468) Stub spec that tries to connect to pypi.python.org Prevent spec failure caused by network device mock leak Fix #7299 - do not require net/ssh for running rake spec
| * | | | | | Merge branch '2.7.next' into nextMatt Robinson2011-05-137-157/+29
|/| | | | | | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7.next: Revert "(#7220) Add the ability to "inherit" options." (#7469) Add license to test face so tests pass (#7264) Docs: Clarify that subscribe/notify imply require/before (#7468) Stub spec that tries to connect to pypi.python.org Prevent spec failure caused by network device mock leak Fix #7299 - do not require net/ssh for running rake spec
| * | | | | Merge branch '2.7.x' into 2.7.nextMatt Robinson2011-05-134-61/+73
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.7.x: (#7469) Add license to test face so tests pass (#7264) Docs: Clarify that subscribe/notify imply require/before (#7468) Stub spec that tries to connect to pypi.python.org Prevent spec failure caused by network device mock leak Fix #7299 - do not require net/ssh for running rake spec Resolved Conflicts: lib/puppet/util/network_device.rb spec/unit/util/network_device_spec.rb
| | * | | | Merge branch 'ticket/2.7.x/7469-rake-failures' into 2.7.xMax Martin2011-05-121-0/+2
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.7.x/7469-rake-failures: (#7469) Add license to test face so tests pass
| | | * | | | (#7469) Add license to test face so tests passMax Martin2011-05-121-0/+2
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TestIndirection test face defined in indirection_base_spec did not have copyright or license information defined; this was causing order-dependent test failures when unit tests were run before other specs (as in rake spec). This commit adds license and copyright info to the test face to prevent these failures. Paired-with: Daniel Pittman <daniel@puppetlabs.com>
| | * | | | Merge branch 'ticket/2.7.x/7264-metaparameter_reference' into 2.7.xnfagerlund2011-05-121-40/+44
| | |\ \ \ \
| | | * | | | (#7264) Docs: Clarify that subscribe/notify imply require/beforenfagerlund2011-05-121-40/+44
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a doc string only commit. The metaparameter reference was not clear about subscribe and notify being supersets of require and before, respectively. This commit also cleans up some unrelated quoting, arrow-alignment, and language flow issues.
| | * | | | Merge branch 'tickets/2.7.x/7299' into 2.7.xMax Martin2011-05-103-1/+12
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tickets/2.7.x/7299: Prevent spec failure caused by network device mock leak Fix #7299 - do not require net/ssh for running rake spec
| | | * | | | Prevent spec failure caused by network device mock leakBrice Figureau2011-05-072-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were leaking some mocks in the network device singleton from tests to tests. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| | | * | | | Fix #7299 - do not require net/ssh for running rake specBrice Figureau2011-05-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a different fix than the one proposed by Stefan Schulte, based on Luke comments. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| | * | | | | Merge branch 'ticket/2.7.x/7468-stub_xmlrpc_internet_call' into 2.7.xMatt Robinson2011-05-101-20/+24
| | |\ \ \ \ \ | | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | * ticket/2.7.x/7468-stub_xmlrpc_internet_call: (#7468) Stub spec that tries to connect to pypi.python.org
| | | * | | | (#7468) Stub spec that tries to connect to pypi.python.orgMatt Robinson2011-05-101-20/+24
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed a test failure when I ran the specs without an internet connection. Specs should never need an internet connection to pass. Reviewed-by: Max Martin <max@puppetlabs.com>
| * | | | | Revert "(#7220) Add the ability to "inherit" options."Daniel Pittman2011-05-124-136/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9329a1f33b4d7df81ad8661de74f8a3656428570. Conflicts: spec/unit/interface/action_builder_spec.rb spec/unit/interface/action_spec.rb
* | | | | | Merge branch 'next'Daniel Pittman2011-05-12131-1077/+3041
|\ \ \ \ \ \
| * | | | | | Merge branch '2.7.next' into nextDaniel Pittman2011-05-12127-1037/+2919
| |\| | | | |
| | * | | | | maint: sync 'authconfig' to 'rest_authconfig' settingDaniel Pittman2011-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We changed the name of the authconfig setting to specify 'rest_', but this branch merge didn't sync the change through all the tests. Now resolved by renaming the configuration option in the test also. Paired-With: Jacob Helwig <jacob@puppetlabs.com>