summaryrefslogtreecommitdiffstats
path: root/spec/integration
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch '0.25.x'Markus Roberts2010-02-097-14/+28
|\ | | | | | | | | | | | | | | | | | | Conflicts: lib/puppet/agent.rb lib/puppet/application/puppet.rb lib/puppet/configurer.rb man/man5/puppet.conf.5 spec/integration/defaults.rb spec/unit/configurer.rb
| * Fixing #2669 puppetmasterd integration has leaky stateJesse Wolfe2010-02-041-9/+20
| | | | | | | | | | | | | | | | | | | | | | This patches two leaks in the puppetmasterd integration tests that were preventing the script from succesfully connecting to its child puppetmasterd process more than once: 1) a race condition in shutting down puppetmasterd before restarting it 2) holding onto stale SSH certificate information. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fix #1842 Net::HTTP#enable_post_connection_check doesn't work anymoreJesse Wolfe2010-01-305-5/+0
| | | | | | | | | | | | | | | | | | | | The setting enable_post_connection_check doesn't exist on very many versions of ruby, and on those systems there's no way to disable domain name checking on HTTPS. The recommended work-around is to replace certificates when they have incorrect hostnames. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fixing #2914 - pre/post hooks now work for transactionsLuke Kanies2010-01-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was built to be used with etckeeper to version control files in /etc, but can be used for essentially anything. This patch was built to be added to 0.25.4, so it's a least-modify approach. A better approach would be to refactor application/puppet.rb just a bit so it uses Configurer more. This is a simple patch - it just defines 'prerun_command' and 'postrun_command' settings, and runs the appropriate command around each transaction if they're set. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* | Fixed test error message.James Turnbull2010-01-281-1/+1
| |
* | Fixing #1054 - transaction reports are always sentLuke Kanies2010-01-181-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | This refactors how reports, catalogs, configurers, and transactions are all related - the Configurer class manages the report, both creating and sending it, so the transaction is now just responsible for adding data to it. I'm still a bit uncomfortable of the coupling between transactions, the report, and configurer, but it's better than it was. This also fixes #2944 and #2973. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adapt to method name change since 8971d8Brice Figureau2010-01-181-0/+17
| | | | | | | | | | | | | | | | | | When the definition/hostclass/node AST types were removed, the parentclass method was renamed to 'parent'. This patch fixes the incorrect rdoc usage (and some deeper integration test so that it won't happen again). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Merge branch '0.25.x'James Turnbull2010-01-134-3/+8
|\| | | | | | | | | | | Conflicts: lib/puppet/ssl/host.rb spec/spec_helper.rb
| * Fixing #2958 inconsistent errors in spec/integration/bin/puppetmasterd.rbJesse Wolfe2009-12-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was getting inconsistent errors in this file, and it's really two separate issues but they're both trivial. 1) The spec launches ./sbin/puppetmasterd, which may have trouble finding the puppet libraries. It could even load the system-installed puppet rather than the files in the repository -- I think this effect is why the tests were passing on Markus's machine, for example. 2) There's a race condition in this test, and puppetmasterd has gotten slower to start up (perhaps due to the #2877 fix?) Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fix #2924 Test Failed: Puppet::Indirector::FileContent::FileServer when ↵Jesse Wolfe2009-12-181-1/+2
| | | | | | | | | | | | | | | | | | finding files should find plugin file content in the environment specified in the request The change in #2590 (ea584787) clears the environment list that this spec relies on. Reordered the spec so that doesn't happen anymore. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fixing 2870 Spurious failures in spec/integration/ssl/certificate_request.rbJesse Wolfe2009-12-111-0/+2
| | | | | | | | | | | | There's a dependency on Puppet::SSL::Host.ca_location Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fixing 2862 spec/integration/file_serving/metadata.rb fails unless run with ↵Jesse Wolfe2009-12-111-0/+1
| | | | | | | | | | | | | | | | | | other tests Due to some heavy mocking, this code was failing to load a dependency. If the `require` happens earlier, then the test passes. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* | Merge branch '0.25.x'Luke Kanies2009-12-212-1/+31
|\| | | | | | | | | | | | | | | Conflicts: lib/puppet/agent.rb lib/puppet/application/puppetd.rb lib/puppet/parser/ast/leaf.rb lib/puppet/util/rdoc/parser.rb
| * Fix for ticket #2844 (file recursion generated vs. explicit prefix)Markus Roberts2009-11-211-1/+20
| | | | | | | | | | | | | | | | | | | | | | The routine which was determining if one path was a prefix of another in arbitrating between explicit and generated resources was using the raw string for the test without regard to path segments and thus could be fooled by pairs such as "/tmp/foo" vs. "/tmp/foo2" Fix was to be path delimiter aware and add a test. Signed-off-by: Markus Roberts <Markus@reality.com>
| * Fix for #2670, Puppet silently ignores catalog_formatBruce Williams2009-11-061-0/+11
| | | | | | | | | | | | | | | | | | | | Since "preferred_serialization_format" was introduced, the older "catalog_format" setting (yaml|marshal), when provided, has been silently ignored and the default for "preferred_serialization_format" used. This re-introduces "catalog_format," logs a deprecation notice, and passes on any provided value to "preferred_serialization_format." Signed-off-by: Bruce Williams <bruce@codefluency.com>
* | Fixing #2596 - Node, Class, Definition are not ASTLuke Kanies2009-12-092-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit extracts these three classes into a single ResourceType class in the Parser heirarchy, now completely independent of the AST heirarchy. Most of the other changes are just changing the interface to the new class, which is greatly simplified over the previous classes. This opens up the possibility of drastically simplifying a lot of this other code, too -- in particular, replacing the reference to the parser with a reference to the (soon to be renamed) LoadedCode class. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing #1507 - Adding a :ca_name settingLuke Kanies2009-11-201-0/+5
| | | | | | | | | | | | | | | | This allows one to specify the name to use in the CA certificate. It defaults to the :certname, but for those stuck using mod_ssl it can be changed. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing #2617 - using the searched-for REST nameLuke Kanies2009-11-202-2/+1
| | | | | | | | | | | | | | | | | | This allows a separation between the wrapper class and its internals, which is (at least) necessary for the CA cert, which might not be found using the internal name. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Always using the CA_name constant instead of "ca"Luke Kanies2009-11-202-2/+2
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fix #2649 Allow ssl dir creation in --noop modeRein Henrichs2009-11-191-0/+23
| | | | | | | | | | | | | | | | Wrap Puppet::Settings.use in a block that disables noop mode during the execution of the block and ensures that noop returns to its original value afterwards. This allows internal puppet catalog operations like ssl directory creation to occur even when puppet is run in --noop mode. This should actually solve a broader class of related bugs.
* | Covers the RDoc Puppet Parser with specsBrice Figureau2009-10-241-0/+42
|/ | | | | | | | This doesn't cover all the code, only the part that interacts with Puppet internals which is what matters when Puppet changes. This patch also contains an integration test. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix for #2745 fakedata tests not workingMarkus Roberts2009-10-231-4/+4
| | | | | | | | | The old fakedata test facility was not playing nicely with the spec tests; although it looped through all the files failures in any example file after the first were being ignored because of the way fakedataparse was interacting with the before blocks. Signed-off-by: Markus Roberts <Markus@reality.com>
* Bundling of pure ruby json lib as "pson"Markus Roberts2009-10-175-51/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bundeling and renaming the pure ruby json library to addresses a number of cross version serliaization bugs (#2615, et al). This patch adds a subset of the files from the json_pure gem to lib/puppet/external/pson (renamed to avoid conflicts with rails) so that we will always have a known-good erialization format available. The pure ruby json gem as distibuted defers to the compiled version if it is installed. This is problematic in some circumstances so the files that have been brought over have been modified to always and only use the bundled version. It's a large patch, so here's a breakdown of the change categories: The majority of the lines are only marginally interesting: * The json lib itself (in lib/puppet/external/pson) make up the bulk of the lines. * Renaming of json to pson make up the second largest group. Somewhat more interesting are the following, which can be located by searching the diffs for the indicated strings: * Adjusting tests to reflect the changes * Changing the encoding/decoding behavior so that nested structures (e.g. resources) don't serialize as escaped strings. This should make it much easier to process the results with external tools, if needed. Search for "to_pson" and "to_pson_data_hash" * Cleaning up the envelope/metadata * Now provides a document_type (as opposed to a ruby class name) by using a symple registration scheme instead of constant lookup (search for "document_type") * Added an api_version (search for "api_version") * Added a hash for document metadata (search for "metadata") * Removing the yaml monkeypatch and instead disabling yaml serialization on ruby 1.8.1 in favor of pson (search for "yaml") * Cleaning up the json/rails feature interaction (they're now totally independent) (search for "feature")
* Fixing #2632 - 'require' works for 0.25 clientsLuke Kanies2009-09-221-3/+5
| | | | | | | | I couldn't find a way to make it compatible with earlier clients, so the docs specify that it doesn't work with them, and it helpfully fails. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2617 - use the cert name as specifiedLuke Kanies2009-09-221-1/+3
| | | | | | | | | | This allows us to search for a cert, and we use the searched-for term as the cert name (for the wrapper, not the actual cert object), rather than the real cert name. This allows us to use symbolic names like 'ca', as we're currently doing. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2574 - autoloading finds plugins in modulesLuke Kanies2009-09-011-0/+18
| | | | | | | | We had some stupid errors that were preventing this from happening; this fixes them and adds an integration test. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2460 - puppetmasterd can now read the cert and keyLuke Kanies2009-08-241-0/+10
| | | | | | | | | | | | This follows on to the previous commits which made Puppet resilient to the service user being absent. This just changes the default owner of all of the cert-related files to now be the service user, which means that on the server all of these files will be owned by that user and on the client, at least when the service user does not exist, they will be owned by root. Signed-off-by: Luke Kanies <luke@madstop.com>
* Not using the service user in settings when it's unavailableLuke Kanies2009-08-241-0/+1
| | | | | | | | | This gets us most of the way toward fixing #2460 - we can now have the certificate information owned by the service user when it's available, thus making it so that puppetmasterd (not running as root) can read it. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing the yamldir group to be a group instead of userLuke Kanies2009-08-241-0/+5
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Moving Setting classes into separate filesLuke Kanies2009-08-241-5/+5
| | | | | | | | This isn't really a refactor, just moving code around. I did some simple method renaming, also. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2558 - propagating recent fileserving changesLuke Kanies2009-08-241-1/+51
| | | | | | | | | | | | | | | | | | I'd made changes to the internals of the fileserving system to fix #2544 (mostly switched from passing the node around and then calculating the environment to just passing the environment around), but those changes weren't consistent throughout the fileserving code. In the process of making them consistent, I realized that the plain file server actually needs the node name rather than the environment, so I switched to passing the request around, because it has both pieces of information. Also added further integration tests which will hopefully keep this from cropping up again. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #1544 - plugins in modules now works againLuke Kanies2009-08-182-0/+83
| | | | | | | | | | | | We had to fix the fileserving plumbing to use the request environment instead of trying to use the node environment. This was apparently never fixed after we added the environment to the URI in REST calls. There's still a bit of refactoring left to clean up the APIs used in some of this code. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removed misguided case sensitivity testsMarkus Roberts2009-08-182-19/+0
| | | | | | | | Removed two failing tests added in the process of reproducing #2493 because they enforced case-insensitivity in excess of that provided by 0.24.8 and thus contrary to user expectations. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fixes #2493Markus Roberts2009-08-143-33/+97
| | | | | | | | | | | | Added downcasing into find_or_load (which replaced fqfind) to get back the old behaviour. Adjusted tests so that they would catch the problem & confirmed that they fail without the downcasing. Added tests to confirm the existance of #2493; improved existing autoload tests (removed inter-test interactions) and noted (with a TODO) that there was dead code in the feature loading test; added analogus case sensitivity tests where apropriate.
* Fix #2507 - Add missing integration testsBrice Figureau2009-08-132-4/+65
| | | | | | | | Some of the integration tests were either missing or not complete, especially tests about exported non virtual resources or virtual and exported resources. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2507 - Exported resources were not correctly collected.Brice Figureau2009-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | #2507 contains two issues: * a crash when we filters-out an unwanted resource which had edges pointing to it. * resources are losing their virtuality when they are transformed from Puppet::Parser::Resource to Puppet::Resource. This means we weren't able to distinguish anymore between an exported resource collected in the same node as it was exported and an exported resource collected in another node. The net result is that we can't apply exported resources that are collected in the same node because they are filtered out by the catalog filter (see the commits for #2391 for more information). The fix is to keep the virtuality of the resources so that we can differentiate those two types of exported resources. We keep this until the catalog is ready to be sent, where we filter out the virtual resouces only, the other still exported ones needs to be sent to the client. To be real sure, the transaction also skips virtual resources. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixing more tests broken from missing librariesLuke Kanies2009-08-104-15/+27
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2489 - queue integration tests are skipped w/out jsonLuke Kanies2009-08-101-2/+4
| | | | | | | | | All of the tests were failing because we had a call outside of any of the tests, just to autoload the constant. Removed that call and stubbed things so the tests don't run without json. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removed extraneous debuggingroot2009-08-041-4/+0
|
* Updated two more testsJames Turnbull2009-08-041-0/+4
|
* Adding integration tests for #2371 (backup refactor)Luke Kanies2009-08-031-0/+106
| | | | | | Also removed old conflicting file tests. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixes #2464, #2457. Deprecate reportserver for report_server. Add ↵Nigel Kersten2009-08-041-0/+29
| | | | report_port setting. Add tests.
* Fixes #2444 - Various JSON test failuresMarkus Roberts2009-08-031-3/+17
|
* Adding #2477 - puppet can apply provided catalogsLuke Kanies2009-08-021-0/+30
| | | | | | | | | | | | This provides the other half of #2440 - you can compile catalogs into json with puppetmasterd, and now you can take those json catalogs and apply them. This allows you to use whatever mechanism you want to ship the catalogs around. Signed-off-by: Luke Kanies <luke@madstop.com>
* Migrating Handler base tests from test/ to spec/Luke Kanies2009-08-021-0/+25
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Migrating Feature tests to specLuke Kanies2009-08-021-0/+54
| | | | | | | | | | This was to fix a failing test/unit test. Test coverage is now a bit better, more maintainable, and I refactored the code just slightly to make it a bit cleaner. Signed-off-by: Luke Kanies <luke@madstop.com>
* Migrating tests to spec and removing an obsolete testLuke Kanies2009-08-021-0/+19
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding support for an external catalog versionLuke Kanies2009-08-012-0/+33
| | | | | | | | This allows you to specify a command used to determine the catalog version. Also added an integration test to verify the version cascades. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #2296 - overlapping recursions work againLuke Kanies2009-07-251-0/+21
| | | | | | | | | | | | This fixes the behaviour when you have file recursions that overlap - we again correctly use the most specific information. It's still a bit expensive when you do this, but at least it behaves correctly, and it should be a rare circumstance. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing a test broken by changing the default os x package typeLuke Kanies2009-07-241-1/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>