summaryrefslogtreecommitdiffstats
path: root/spec/integration
Commit message (Collapse)AuthorAgeFilesLines
...
* Feature #3383 Part 2: Remove RAL XMLRPCJesse Wolfe2010-02-172-2/+2
| | | | | | | The XMLRPC interface for RAL resources was broken, and has been completely replaced by the REST interface. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Feature #3347 REST-ified FileBucketJesse Wolfe2010-02-173-49/+69
| | | | | | | | | | | | | | | | FileBucket Files have been reimplemented as an indirector terminus so that they can be transmitted over REST. The old Network::Client.dipper has been replaced with a compatibility later in FileBucket::Dipper that uses the indirector to access filebucket termini. Slightly revised patch: * No longer allows nil contents in FileBucket outside of initialization * Uses File.exist? instead of the deprecated File.exists? * Tweaks JSON serialization and de-serialization to include "path" Deferred issues: * Feature #3371 "FileBucket should not keep files in memory". * Feature #3372 "Replace FileBucket Dipper with more idiomatic calls"
* Feature #3115 REST-ified status()Jesse Wolfe2010-02-171-0/+155
| | | | | | | | | | | | | | | | | | This patch re-implements the status() remote procedure as a REST interface. A running server returns key-value pairs, currently the only implemented key is "is_alive" which will always be set to true. Some future tool will consume this by: Puppet::Status.indirection.terminus_class = :rest Puppet::Status.find('https://puppet:8140/production/status/default') Now with unit tests. plus fixes a typo. plus integration test and default security setting. plus tests suggested by Brice. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Adding client and server data dirsLuke Kanies2010-02-171-0/+8
| | | | | | | | These replace the yaml and file dirs, since in #1943 we're merging the file and yaml Terminus classes. Signed-off-by: Luke Kanies <luke@madstop.com>
* Renaming Parser::ResourceType to Resource::TypeLuke Kanies2010-02-174-5/+5
| | | | | | | | | | Basically, these classes (ResourceType and ResourceTypeCollection) don't really belong in Parser, so I'm moving them to the Resource namespace. This will be where anything RAL-related goes from now on, and as we migrate functionality out of Puppet::Type, it should go here. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Removing Interpreter classLuke Kanies2010-02-172-46/+29
| | | | | | | It's no longer necessary, given the new ResourceTypeCollection class. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* All non-transient parser references are goneLuke Kanies2010-02-171-1/+1
| | | | | | | | | We now use references to the ResourceTypeCollection instances through the environment, which is much cleaner. The next step is to remove the Interpreter class. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing callers to Parser to only pass environmentLuke Kanies2010-02-172-2/+2
| | | | | | | We previously passed a hash of options but now just the environment. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Renaming LoadedCode to ResourceTypeCollectionLuke Kanies2010-02-171-1/+1
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Storing per-environment LoadedCode instancesLuke Kanies2010-02-171-2/+2
| | | | | | | | | | | | This will soon replace all of the env/parser mungling we have to do. A given process will only be able to have one collection of code per environment in memory. This is somewhat limiting, in theory, but some global means of looking up code collection (LoadedCode instances) must exist for the pure ruby stuff to work. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Changing REST report integration test to use new interfaceLuke Kanies2010-02-171-4/+3
| | | | Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Changing Transaction to use the new ResourceHarnessLuke Kanies2010-02-172-4/+23
| | | | | | | | | | | | This is a much messier commit than I would like, mostly because of how 'file' works. I had to fix multiple special cases, and I had to move others. The whole system appears to now work, though, and we're ready to change reports to receive resource status instances rather than events. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Switching transactions to callback-based eventsLuke Kanies2010-02-171-0/+118
| | | | | | | | | | | | | Events are now queued as they are created, and the queues are managed through simple interfaces, rather than collecting events over time and responding to them inline. This drastically simplifies event management, and will make moving it to a separate system essentially trivial. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fix #3186 - require function set relationship only on the last classBrice Figureau2010-02-171-1/+18
| | | | | | | | Due to the fact that resource.set_parameter is overwriting the previous set_parameters, we were losing the previous relationships we set there, either in a previous call of require or in the same call. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* [#3392] Better Rakefile, remove puppetmasterd specRein Henrichs2010-02-171-145/+0
| | | | | - Minor improvements to Rakefile spec task - Remove puppetmasterd spec, to be run as part of the testing matrix
* Bug #3401 Spec failed due to missing manditory setting in mockJesse Wolfe2010-03-221-2/+6
| | | | | Puppet::Util::Settings#use now requires the :noop setting to exist, and this test was not providing one in its mocked default structure.
* 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.