summaryrefslogtreecommitdiffstats
path: root/spec/unit/network
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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.
* | Adding pidfile management and daemonization to the ServerLuke Kanies2008-05-071-195/+301
| | | | | | | | class.
* | Fixing the HttpPool module to get rid of an infinite loop.Luke Kanies2008-05-062-3/+11
| | | | | | | | | | | | | | | | | | 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.
* | The http pool manager now uses new-style certificate management.Luke Kanies2008-05-051-94/+72
| | | | | | | | | | It uses an instance of SSL::Host for getting its certificate and ssl store.
* | 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-022-1/+12
| | | | | | | | | | | | | | | | 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 backward compatibility to the new Mongrel code.Luke Kanies2008-05-021-10/+37
| |
* | Adding xmlrpc support to webrick.Luke Kanies2008-05-021-38/+92
| | | | | | | | | | This provides the backward compatibility for webrick, and only Mongrel is left.
* | Adding configuration support for XMLRPC handlers.Luke Kanies2008-05-021-118/+218
| | | | | | | | | | | | | | | | | | This provides the interface for configuring backward compatibility in the new-style server code. It requires a completely different configuration step, in that REST and xmlrpc handlers are configured separately, rather than using the same handler names, but this was considered less evil than having a large abstraction layer for specifying how the handlers are related.
* | 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
| |
* | Merge branch '0.24.x'Luke Kanies2008-04-211-8/+8
|\| | | | | | | | | | | Conflicts: bin/puppetca
| * Fixed some tests broken by #1176James Turnbull2008-04-191-8/+8
| |
* | 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.
* | Merge branch '0.24.x'Luke Kanies2008-04-115-346/+340
|\| | | | | | | | | | | Conflicts: spec/unit/network/server.rb
| * updating mongrel/webrick unit tests to match integration-tested version of ↵Rick Bradley2008-04-112-22/+4
| | | | | | | | REST save functionality
| * adding REST save support, with integration tests. A handful of unit tests ↵Rick Bradley2008-04-111-2/+0
| | | | | | | | in that area now need to be updated.
| * Make mongrel happy like WEBrick.Rick Bradley2008-04-113-280/+270
| | | | | | | | Refactored specs to put some of the lower-level find/save/search/destroy unit tests under their own contexts.
| * Much larger commit than I would like to land at once. This is all ↵Rick Bradley2008-04-113-36/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * This is the first version where mongrel and webrick are reliably startable ↵Rick Bradley2008-04-112-11/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and stoppable via Puppet::Network::Server. Added a network/server integration spec, testing startup, shutdown, reachability, and collision of webrick and mongrel servers in the new network code. Converted Puppet::Network::HTTP::Handler class to a module, as mongrel Handler should be subclassed; converting subclasses to include the module instead. Mongrel will actually stop if you .stop it, graceful_shutdown didn't seem quite so reliable. Webrick requires running in its own Thread to avoid hanging the entire process; this requires introduction of a Mutex to make things safe. We're only supporting the REST protocol. Made this explicit. Fixed http server setup args, w/ specs, ah the glory of integration testing.
| * the indirector will not serve xmlrpc (this is the responsibility of the ↵Rick Bradley2008-04-112-14/+4
| | | | | | | | legacy networking code; it was a mistake to include stubbed support for it in the new code); removing
* | Merge branch '0.24.x'Luke Kanies2008-04-111-25/+0
|\|
| * Removed the code from the client that tries to avoid recompilingLuke Kanies2008-04-101-25/+0
| | | | | | | | | | | | the catalog. The client will now always recompile, assuming it can reach the server. It will still use the cached config if there's a failure.
* | Merge branch '0.24.x'Luke Kanies2008-03-252-96/+161
|\| | | | | | | | | | | | | | | Conflicts: install.rb lib/puppet/defaults.rb man/man8/puppet.8
| * Disabling http keep-alive as a means of preventing #1010.Luke Kanies2008-03-242-96/+161
| | | | | | | | | | | | | | There is now a constant in Puppet::Network::HttpPool that will disable or enable this feature, but note that we determined that it can cause corruption, especially in file serving (but it's client-side corruption).
* | Merge branch '0.24.x'Luke Kanies2008-03-051-26/+13
|\|
| * Fix tests depending on the Puppet[:localcert] file existing using stubsAndrew Shafer2008-03-041-26/+13
| | | | | | | | Some minor refactoring, pulling repeated setup up to 'before'
* | Merge branch '0.24.x'Luke Kanies2008-02-251-0/+4
|\|
| * Fixing a test that was actually reading in keysLuke Kanies2008-02-211-0/+4
| | | | | | | | | | from the filesystem and failed when those keys were unreadable.
* | Merge branch 'routing'Luke Kanies2008-01-011-4/+4
|\ \ | |/ |/|
| * tweaking spec language; require Puppet::Network::HTTP class since it is ↵Rick Bradley2007-12-071-4/+4
| | | | | | | | referenced by Puppet::Network::Server
* | Removing the ability to disable http-keep alive,Luke Kanies2007-12-191-18/+8
| | | | | | | | since it didn't work and is now unnecessary.
* | Entirely refactoring http keep-alive. There's nowLuke Kanies2007-12-192-107/+237
| | | | | | | | | | | | | | | | a central module responsible for managing the http pool (Puppet::Network::HttpPool), and it also handles setting certificate information. This gets rid of what were otherwise long chains of method calls, and it makes the code paths much clearer.
* | Fixing #961 -- closing existing, open connections whenLuke Kanies2007-12-171-1/+31
| | | | | | | | | | a new connection is requested, and closing all connections at the end of each run.
* | Renaming 'configuration' to 'catalog', fixing #954.Luke Kanies2007-12-113-42/+42
| |
* | Fixing some further failing tests resulting from the fix forLuke Kanies2007-12-101-13/+11
|/
* Updated tests for http_enable_post_connection_check configuration setting.Jeffrey J McCune2007-11-291-0/+10
|
* Fixing a couple of tests that were failing on a different platform or with a ↵Luke Kanies2007-11-281-1/+1
| | | | different version of ruby
* Integrating most of Matt Palmer's fromLuke Kanies2007-11-241-0/+69
| | | | | | | http://theshed.hezmatt.org/mattshacks/puppet/_patches/puppet-0.23.2/. There are still a few that haven't made it in, notably those related to the plugins module, which I'm planning on integrating separately.
* Reverting the changes I'd made toward removing the globalLuke Kanies2007-11-191-112/+1
| | | | | | | | resources. These are commits: c19835ce9f8a5138b30a1a32ca741c996b0916d2 9290cc89a2206fb5204578f8e91208857a48b147 ffb4c2dbc7314b364d25e4f7be599ef05b767b44
* Fixed most failing tests, but there are still over thirty failing.Luke Kanies2007-11-181-1/+22
| | | | | | At this point, I'm holding the experiment until after the release, so I'm committing this for now and will take it back up after 0.24.0 is out.
* Modifying how default resources are created; they are nowLuke Kanies2007-11-151-4/+17
| | | | | added to the configuration by the master client, rather than by the creating types.
* This commit is the first run at removing all globalLuke Kanies2007-11-131-1/+78
| | | | | | | | | | references to resources. It deprecates the class-level [] and []= methods, used for so long to provide closure behaviour but now unnecessary with the node configuration's ability to function as a resource container. All of the spec tests pass, but there is much to do to make the test/ tests pass, I expect.
* Fixing #800 by refactoring how configurations are retrievedLuke Kanies2007-11-121-0/+365
| | | | | | | | | from the server. The real problem was getting all of the validation done before any caching, which required a good bit more refactoring than I expected. In actuality, this commit is relatively small even though it covers many files; most of the changes just make the code clearer or shorter.
* One significant step closer to getting autotest running properly on the ↵Rick Bradley2007-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | Puppet specs. Created a spec/lib/monkey_patches/ directory for holding patches to RSpec functionality. Extraced 'confine' and 'runnable?' support from the local copy of RSpec (spec/lib/spec/) and now load them from the monkey_patches/ directory. Fixed a bad include in one of the specs. Made it possible for the gem-installed spec binary (which autotest calls) to be used with Puppet. Imported the Autotest::Rspec class, created a PuppetRspec autotest class, added a discovery.rb file for autotest to pick these up. Autotest still has the following problems: * it needs to be run with the proper include path: % ruby -I spec/lib/ `which autotest` * the patterns in our custom autotest handler (puppet_rspec) aren't yet fully specified (they only recognize changes in our spec files, not changes in the puppet libs which they are testing)
* Exceptions on requests are now captured, exceptions are serialized, and ↵Rick Bradley2007-10-232-17/+105
| | | | exception text is passed back via REST.
* Finish serializing successful results (via calls to to_yaml, etc.) for REST ↵Rick Bradley2007-10-232-131/+165
| | | | handlers. Refactor request building in REST handler specs.
* REST handlers now properly returning 200 status on success.Rick Bradley2007-10-232-12/+66
|
* Merge branch 'master' of git://reductivelabs.com/puppet into routingRick Bradley2007-10-221-1/+6
|\ | | | | | | | | | | Conflicts: spec/unit/indirector/indirection.rb