summaryrefslogtreecommitdiffstats
path: root/spec/integration/indirector
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixing #1557 - Environments are now in REST URIsLuke Kanies2009-03-205-10/+10
| | | | | | | | | | | | | | | | | | This commit includes multiple, related changes, all in one commit because the whole thing was necessary to reach a functional tree again: * The URI starts with the environment, so: /production/certificate/foo /development/file_content/path/to/your/file * All REST handling is done by a single instance mounted at / for webrick and Mongrel, rather than having individual instances mounted at, say, /certificate. * All REST URI translation is done by an API module. Currently only the 'v1' module exists with no support for additional modules, but it's well-separated and will be easy to expand as we need it. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #1849 - Ruby 1.9 portability: `when' doesn't like colons, replace with ↵James Turnbull2009-02-261-3/+3
| | | | semicolons
* Adding pluginsyncing support to the IndirectorLuke Kanies2009-02-192-62/+0
| | | | | | | | | This switches away from the use of terminii for each type of fileserving - it goes back to the traditional fileserving method, and is much cleaner and simpler as a result. Signed-off-by: Luke Kanies <luke@madstop.com>
* Switching the ModuleFiles Indirection terminus to the new Module/Env apiLuke Kanies2009-02-191-4/+7
| | | | | | Again, much cleaner and simpler. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing fileserving to support strings or symbolsLuke Kanies2009-02-181-4/+4
| | | | | | | When used internally we would use symbols, but the REST transfers need to support strings. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fix #1834 part1 - Fix tempfile failing testsBrice Figureau2008-12-202-2/+4
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #1483 - protect report terminus_class when testing for RESTBrice Figureau2008-12-081-0/+2
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #1483 - use REST to transmit reports over the wireBrice Figureau2008-12-061-0/+91
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Properly cleaning up ssl ca configuration during testingLuke Kanies2008-11-114-4/+8
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Changing the Cacher.invalidate method to Cacher.expire.Luke Kanies2008-11-114-5/+5
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Deduplicating slashes in the fileserving codeLuke Kanies2008-11-041-1/+1
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding automatic attribute collection to the new fileserving code.Luke Kanies2008-08-262-29/+22
| | | | | | | | | | | Basically, this just includes a consistent method for collecting info (either content or metadata) and then calls that method when returning instances via the indirector. It's such a large commit mostly because of small changes in the normal code and large changes in the testing to accomodate those small changes. Signed-off-by: Luke Kanies <luke@madstop.com>
* Refactoring how files in FileServing are named.Luke Kanies2008-08-262-4/+4
| | | | | | | | | | | | | | | | | Previously, they retained some concept of the URI used to find them, and this uri was the primary key for the FileServing instances. This key was unfortunately completely useless, as evidenced by the fact that it was never used except to test that it worked. I've modified the FileServing instances (through modifying the Base class) to use their local path as their key, and they no longer care about the URI at all. This commit is mostly about fixing the code that interacts with the instances to use this new API. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding parameter and URL support to the REST terminus.Luke Kanies2008-08-201-1/+21
| | | | | | | | | | | | | Previously, the server side correctly pulled parameters out of the query strings, but the REST terminus never passed them on. It does now, at least for finding and searching. It appears that at least WEBrick doesn't support parameters for anything other than forms and GET. I've also added the ability for the REST terminus to pull host/port information from the request key, if it's a URI. Signed-off-by: Luke Kanies <luke@madstop.com>
* Documenting a bit of a testLuke Kanies2008-08-071-1/+4
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Certificates now work over REST.Luke Kanies2008-08-073-0/+223
| | | | | | | | | All of the format work is done, they all support plaintext successfully, and I've got integration tests that demonstrate that it actually works. Signed-off-by: Luke Kanies <luke@madstop.com>
* Correctly handling when REST searches return nothing.Luke Kanies2008-07-301-1/+8
| | | | | | | | | | | | | | We return a 404, which the client can correctly handle. That wasn't the actual problem causing failing tests, of course -- the problem was that one side of our stub was autodetecting marshal, and the other side was forcing yaml, which strangely didn't work. It was only happening with searching, though, not finding et al. The 'search returning nil' problem was a bit of a red herring but needed to be fixed, too. Signed-off-by: Luke Kanies <luke@madstop.com>
* Searching again works over REST, including full content-type translation.Luke Kanies2008-07-291-33/+43
| | | | | | | | | The format management is a bit clunky right now, though, so I need to fix how they're managed. Some of these tests fail, but 99% of the remaining work is in other classes so I wanted this as a discrete commit. Signed-off-by: Luke Kanies <luke@madstop.com>
* All error and format handling works over REST except searching.Luke Kanies2008-07-291-28/+31
| | | | | | | | | Searching operates on multiple instances, and I have not yet figured out how we should handle converting multiple instances to a given format -- we can't use the instance method (e.g., to_yaml), because it would be on Array instead of the class we're operating on. That would work for yaml, but not, for instance, for xml.
* The REST terminus now uses the content-type and http result codes.Luke Kanies2008-07-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | Things are currently broken -- this is a checkpoint commit so that it's safe to make mistakes and will probably be removed. Signed-off-by: Luke Kanies <luke@madstop.com> The REST terminus now completely does error handling and serialization. The Integration tests are still completely broken. Signed-off-by: Luke Kanies <luke@madstop.com> The Mongrel and Webrick rest handlers no longer yaml-encode exceptions. They just store the exceptions in plain text in the message body. They also set the status to 400, rather than 404. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing a now-obsolete pending test.Luke Kanies2008-07-291-8/+0
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Merge branch '0.24.x' into mergingLuke Kanies2008-07-291-2/+6
|\ | | | | | | | | | | Conflicts: test/ral/type/filesources.rb
| * Fixed all of the fileserving termini so they use indirection requests.Luke Kanies2008-07-181-2/+6
| | | | | | | | | | | | | | | | This looks like a much larger commit than it is -- it doesn't change any behaviour at all, it just adds some integration tests (which expose the problem) and then switches from an ad-hoc api to a request-based api. Signed-off-by: Luke Kanies <luke@madstop.com>
| * The mongrel-related tests now run without mongrel.Luke Kanies2008-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | Here were the main changes necessary: * Fixed the class loader so it only loads mongrel if it's available. * Fixed the test runner to skip example groups contained in non-runnable example groups. * Fixed the Mongrel tests to use quoted class names instead of constants, since the constants themselves would be absent. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x'Luke Kanies2008-07-021-10/+3
|\|
| * Fixing the ldap node integration test so it cleans upLuke Kanies2008-07-021-10/+3
| |
* | Merge branch '0.24.x'Luke Kanies2008-07-021-0/+22
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: CHANGELOG spec/unit/node/catalog.rb spec/unit/type/package.rb spec/unit/type/schedule.rb spec/unit/type/service.rb spec/unit/util/settings.rb
| * Fixing the Node::Ldap.search method to use an indirection request.Luke Kanies2008-07-011-0/+22
| | | | | | | | | | | | I foolishly was just using the old-style api. Added an integration test to catch this in the future.
* | Merge branch '0.24.x'Luke Kanies2008-06-141-14/+19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also added the fixes to make the certhandler tests pass even when certs exist; I'll deal with the conflict later. Conflicts: CHANGELOG bin/puppetd lib/puppet/network/http/handler.rb lib/puppet/network/http/mongrel/rest.rb spec/integration/indirector/rest.rb spec/integration/network/server/mongrel.rb spec/integration/network/server/webrick.rb spec/unit/network/http/webrick.rb
| * Adding another note about the save_object stub.Luke Kanies2008-06-131-0/+3
| |
| * Removing a duplicate call left over from debuggingLuke Kanies2008-06-131-1/+0
| |
| * Replacing all two-space indents with four-spaceLuke Kanies2008-06-131-407/+407
| |
| * Adding ruby interpreter lines to the tests missing them.Luke Kanies2008-06-131-0/+2
| |
| * Adding execute bits to every test currently missing them.Luke Kanies2008-06-131-0/+0
| |
* | Fixing #1258 -- Removing a Rails idiom.Luke Kanies2008-05-251-2/+2
| | | | | | | | | | | | This idiom is only functional when you have Rails loaded, which is why it was failing for others but not me.
* | Using the new Cacher class for handling cached data.Luke Kanies2008-05-131-5/+3
| | | | | | | | | | This provides a single, global bit for determining whether a given piece of cached data is still valid.
* | The REST infrastructure now correctly the SSL certificates.Luke Kanies2008-05-051-408/+428
| | | | | | | | | | | | | | I don't think the whole thing is done, but at least the basic flows are in place. Now it's just a question of doing real-world tests and fleshing out the unit tests as necessary.
* | Fixing an integration test of the rest terminus; it wasLuke Kanies2008-04-151-1/+5
|/ | | | | | broken by my incomplete cert support in webrick. I just stubbed out the cert usage for now; once all the cert stuff is done we'll need to go back and unstub it.
* Fixishing some pending tests, including filling inLuke Kanies2008-04-111-2/+8
| | | | the connection information.
* Making the changes necessary to get the REST supportLuke Kanies2008-04-111-11/+9
| | | | | to work with the current state of the indirection work, including using a request object and an expiration date.
* adding REST save support, with integration tests. A handful of unit tests ↵Rick Bradley2008-04-111-2/+91
| | | | in that area now need to be updated.
* Added support for destroy/DELETE over REST (including units & integrations ↵Rick Bradley2008-04-111-2/+74
| | | | | | | | on both webrick & mongrel). Added pending specs for the trivialities in the REST network_fetch and network_delete methods. Refactored YAML exception detection out into a private helper method.
* updating search integration specs to include webrickRick Bradley2008-04-111-4/+59
|
* making search work over REST, w/ unit & integration specsRick Bradley2008-04-111-4/+59
|
* placeholders for integration specs on final REST methodsRick Bradley2008-04-111-0/+24
|
* ensure that we only run the mongrel specs when mongrel is available as a featureRick Bradley2008-04-111-0/+2
|
* bringing Indirector::REST specs to mongrel-land as well.Rick Bradley2008-04-111-44/+112
|
* exceptions on remote end now properly passed to local end via REST and ↵Rick Bradley2008-04-111-3/+3
| | | | re-raised (integration-tested)
* Much larger commit than I would like to land at once. This is all ↵Rick Bradley2008-04-111-9/+65
| | | | | | | | | | | | | | | | | | | | | REST-related code. Two specs are failing related to how Mongrel is initialized for REST; will fix those shortly. REST indirector now supports find, with deserialization. Network code in indirector now. Will still need to un-hardwire address/port for outbound connections. Will still need to urlencode path parameters. Code for search, destroy, update is coming, should be similar to find. Reworked how the Handler module is used. Needed to be included, rather than inherited. Needed to sidestep initializers for actual web servers (webrick, mongrel), needed to be possible to have handler-including class be used as a class (aka servlet) instead of as an instance. Webrick handler registration is now abstracted to "above" the servlet. Provided a #model method to use instead of @model in handler module. This allows neutering during testing. Brought class_for_protocol up into http/webrick class as a (tested) class method. Integration tests for rest indirection. Split server integration tests into mongrel and webrick tests. Got Node/REST working properly wrt the crazy-ass autoloader thing. We're now actually passing traffic w/ webrick, fwiw.
* a trivial integration test to test whether the RESTful indirection terminus ↵Rick Bradley2008-04-111-0/+35
| | | | has a remote shot at working; will need to be upgraded to actually be useful