summaryrefslogtreecommitdiffstats
path: root/spec/unit/network/http/webrick.rb
Commit message (Collapse)AuthorAgeFilesLines
* [#3994] rename the specs to have _spec.rb at the endMarkus Roberts2010-06-231-339/+0
| | | | | | | | | Some spec files like active_record.rb had names that would confuse the load path and get loaded instead of the intended implentation when the spec was run from the same directory as the file. Author: Matt Robinson <matt@puppetlabs.com> Date: Fri Jun 11 15:29:33 2010 -0700
* Feature #2935 Puppet::Mode#master?Jesse Wolfe2010-02-171-4/+4
| | | | | | | Use a predicate function on the Mode object instead of comparing with the executable name everywhere Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Fix 2936 Insufficient mocks for webrick in spec/unit/network/http/webrick.rbJesse Wolfe2009-12-151-2/+2
| | | | | Fixing #2877 introduced some spec failures, by using more of the webrick API than was mocked here.
* Fix for #2772 (webrick test failures)Markus Roberts2009-11-051-2/+2
| | | | | | | This was my bad. My patch for #2637 broke some test's assumptions and I never went back to update them. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fixing a heisenbug resulting from a race conditionLuke Kanies2009-08-241-1/+3
| | | | | | | | | | | We had a case where an expectation could be triggered before the thread finished, in which case it was marked as a failure. We just stub the Thread.new to avoid creating a "real" thread, thus skipping the race condition. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removed extra whitespace from end of linesIan Taylor2009-06-061-5/+5
|
* Fixing #1557 - Environments are now in REST URIsLuke Kanies2009-03-201-22/+5
| | | | | | | | | | | | | | | | | | 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>
* Fixing #1729 - puppetmasterd can now read certs at startupLuke Kanies2008-12-181-11/+3
| | | | | | | | | | The main aspect of this solution is to create a site-wide Puppet::SSL::Host instance to cache ssl key and certificate, so that by the time we've switched UIDs, we've got the key and cert in memory. Then webrick just uses that, rather than creating a new Host instance. Signed-off-by: Luke Kanies <luke@madstop.com>
* Merge branch '0.24.x' into mergingLuke Kanies2008-07-291-0/+1
|\ | | | | | | | | | | Conflicts: test/ral/type/filesources.rb
| * The mongrel-related tests now run without mongrel.Luke Kanies2008-07-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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-06-141-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Replacing all two-space indents with four-spaceLuke Kanies2008-06-131-15/+15
| |
| * Adding execute bits to every test currently missing them.Luke Kanies2008-06-131-0/+0
| |
* | The CRL is now automatically used or ignored.Luke Kanies2008-05-071-11/+1
| | | | | | | | | | | | | | | | | | Previously, you had to configure whether you wanted the CRL or not, which resulted in errors all the time when it was configured but unavailable. Now, Puppet will always create and try to use it, but you won't get failures if it's unavailable.
* | Fixing the HttpPool module to get rid of an infinite loop.Luke Kanies2008-05-061-1/+0
| | | | | | | | | | | | | | | | | | We can't have the HttpPool class use the Indirector to see if it has a cert available, because it might be being used to try to download one, which would cause it to make an http instance, which would cause it to... Well, you get the idea. Adding and fixing a few other tests I ran into on the way.
* | The master is now functionally serving REST and xmlrpc.Luke Kanies2008-05-051-9/+3
| | | | | | | | | | | | | | | | | | | | ...as far as I can tell. The client, however, is broken, since it used the old http_pool/ssl_support stuff, which no longer works. I have to port puppetd over to using the new ssl stuff, then I'll at least be able to verify that the master can still speak xmlrpc.
* | Fixing a critical problem in how CRLs were saved and moving SSL Store ↵Luke Kanies2008-05-051-61/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | responsibilities to the SSL::Host class. I was previously saving invalid CRLs unless they'd had a revocation done in them; this commit fixes them so that they're always valid. Also, I've added to SSL::Host the ability to generate a valid SSL Store, suitable for validation. This is now used by Webrick and can be used by the http clients, too. This should have been two commits, but I'm kind of down the rabbit hole ATM.
* | Switched puppetmasterd to use the new-style server plumbing.Luke Kanies2008-05-021-1/+2
| | | | | | | | | | | | | | | | The code is much cleaner, and it seems to be mostly functional, but we have to pick a strategy for signing the host's certificate on first startup. Also, I haven't actually done end-to-end testing yet, which needs the certs working first.
* | Adding xmlrpc support to webrick.Luke Kanies2008-05-021-38/+92
| | | | | | | | | | This provides the backward compatibility for webrick, and only Mongrel is left.
* | I think I've now got the Webrick SSL support working.Luke Kanies2008-04-281-3/+3
| | | | | | | | | | Now I just need to get xmlrpc working alongside REST in both mongrel and webrick.
* | Interim commit, since I want to work but have no network available.Luke Kanies2008-04-281-15/+124
| |
* | Adding the necessary tests for webrick to have logging andLuke Kanies2008-04-151-0/+145
|/ | | | | ssl. The tests can't be completed until the certificate work is all done.
* Much larger commit than I would like to land at once. This is all ↵Rick Bradley2008-04-111-8/+24
| | | | | | | | | | | | | | | | | | | | | 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.
* the indirector will not serve xmlrpc (this is the responsibility of the ↵Rick Bradley2008-04-111-7/+2
| | | | legacy networking code; it was a mistake to include stubbed support for it in the new code); removing
* Renaming 'configuration' to 'catalog', fixing #954.Luke Kanies2007-12-111-2/+2
|
* Refactored to use a Handler base class for server+protocol handlers. ↵Rick Bradley2007-10-161-10/+4
| | | | Finally eliminated dependency on Puppet.start, etc., from WEBrick HTTP server class. {webrick,mongrel}+REST now support request handling uniformly; need encode/decode next.
* Registration now built for {webrick,mongrel} REST handlers.Rick Bradley2007-10-161-0/+2
|
* Going back to each server+protocol object being responsible for only one ↵Rick Bradley2007-10-161-3/+5
| | | | indirection, as the REST vs. XMLRPC models are different enough that the object must register itself on initialization and handle the request when it comes in.
* First pass through initializers of {mongrel, webrick} REST handlers; hooks ↵Rick Bradley2007-10-161-5/+3
| | | | into Indirection to look up models from indirected names.
* Finish front end of delegation to server+protocol helper classes ("handlers").Rick Bradley2007-10-151-0/+14
|
* Bringing in initial handlers for server+protocol pairs.Rick Bradley2007-10-151-10/+10
|
* Partial support for building Handlers for all handler-protocol pairs.Rick Bradley2007-10-151-4/+19
|
* Implementing address & port support for new webrick server.Rick Bradley2007-10-151-3/+14
|
* Hooking up address/port support for the various servers w/ specs. Still ↵Rick Bradley2007-10-151-10/+19
| | | | need to start up a webrick server w/ address + port (this is far too incestuous with Puppet lib & Puppet.start at the moment).
* trivial: WEBRick -> WEBrick, to be more consistent with how the WEBrick ruby ↵Rick Bradley2007-10-151-6/+6
| | | | classes are named.
* Implementing listening state tracking for webrick and mongrel.Rick Bradley2007-10-151-2/+20
|
* More unit specs for mongrel and webrick; more code to make them work, yo.Rick Bradley2007-10-151-0/+52