summaryrefslogtreecommitdiffstats
path: root/spec/unit/network
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge branch '0.24.x' Removed the 'after' blocks that call Type.clear,Luke Kanies2008-10-172-0/+192
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | since that method is deprecated. Conflicts: CHANGELOG bin/puppetca lib/puppet/file_serving/fileset.rb lib/puppet/network/xmlrpc/client.rb lib/puppet/type/file/selcontext.rb spec/unit/file_serving/metadata.rb spec/unit/type/file.rb
| * Add failing test for plugin with file and recursePaul Nasrat2008-10-091-0/+8
| |
| * Fix several small regressions in plugins mountBrice Figureau2008-10-091-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since a30ecf2aeffd71960bd806fb28cd6d1b8adc2452, reclist has one parameter less, but Puppet::Network::Handler::PluginMount.list wasn't ported to the new API. While mounting plugins, reclist wasn't requiring 'file_serving/fileset', leading to an NameError. The change to the new API meant that we lost the existance test of plugins mount directory. It was failing when the client was mounting module plugins that weren't existing (like facter and no custom facts defined). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Fixed #1473 - Rescue Timeout::Error in xmlrpc clientsAndrew Shafer2008-10-071-0/+13
| | | | | | | | | | Added a rescue block for Timeout::Error (which isn't a subclass of StandardError) Removed a Dev Error conditional to facilitate testing
| * Fixing #947 - pluginsync no longer fails poorly when no plugins existLuke Kanies2008-10-031-2/+2
| | | | | | | | | | | | Note that it still fails -- it's just a more reasonable failure. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fix ticket 1596 in new fileset code, use tmpdir in fileserver tests.Paul Nasrat2008-09-301-1/+1
| |
| * Add tests for FileServer::Mount list for #1544Paul Nasrat2008-09-301-0/+133
| |
* | Merge branch 'feature/master/1481'Luke Kanies2008-09-236-15/+106
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This merges in the new fileserving code -- we're now using REST to do fileserving, rather than xmlrpc. Conflicts: lib/puppet/parameter.rb lib/puppet/type/file.rb spec/unit/type/file.rb
| * | Causing format selection to fail intelligently if no suitable format can be ↵Luke Kanies2008-08-261-0/+31
| | | | | | | | | | | | | | | | | | picked. Signed-off-by: Luke Kanies <luke@madstop.com>
| * | Fixing the rest backends for webrick and mongrel so the get the whole ↵Luke Kanies2008-08-262-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | request key. Also adding the Content work necessary to demonstrate that this is actually required. Signed-off-by: Luke Kanies <luke@madstop.com>
| * | Adding weights to network formats, and sorting them based on the weight.Luke Kanies2008-08-263-9/+38
| | | | | | | | | | | | | | | | | | | | | This way the new hackish RAW format will only ever be used if it's specifically chosen. Signed-off-by: Luke Kanies <luke@madstop.com>
| * | Adding a hackish raw format.Luke Kanies2008-08-261-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | As the comment in the file says, we don't really have enough data to know what a good design would look like, and I think this format will be a bit of a one-off, so I'm just throwing up some barriers to keep people from doing silly things with it. Signed-off-by: Luke Kanies <luke@madstop.com>
| * | Adding suitability as a requirement for a format being supported.Luke Kanies2008-08-261-0/+5
| | | | | | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | | Merge branch '0.24.x'Luke Kanies2008-09-231-0/+42
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | Conflicts: lib/puppet/metatype/container.rb lib/puppet/metatype/instances.rb lib/puppet/metatype/metaparams.rb lib/puppet/metatype/relationships.rb lib/puppet/metatype/schedules.rb
| * Only apply splay the first runAndrew Shafer2008-09-211-0/+42
| | | | | | | | Issue 1491
* | Adding parameter and URL support to the REST terminus.Luke Kanies2008-08-203-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fixing the String format (fixes #1522).Luke Kanies2008-08-201-32/+0
| | | | | | | | | | | | | | | | | | The string format no longer provides any support methods, which means that I had to create to_multiple_s and from_multiple_s methods on the SSL classes. I created them in the base class and tested them just in the cert class. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing #1514 - format tests now work again.Luke Kanies2008-08-201-11/+11
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding a plaintext network format.Luke Kanies2008-08-041-0/+42
| | | | | | | | | | | | Certs don't seem to support yaml, for some reason. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Correctly handling when REST searches return nothing.Luke Kanies2008-07-301-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | The REST formats are now fully functional, with yaml and marshal support.Luke Kanies2008-07-301-1/+66
| | | | | | | | | | | | | | | | This is the last of the REST plumbing. The only flaw right now is that the formats are managed by name rather than by mimetype, which I'll fix next. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding some support for case insensivity in format names.Luke Kanies2008-07-302-2/+17
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Moving validation from FormatHandler to Format.Luke Kanies2008-07-302-11/+4
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Moving functionality out of the FormatHandler into the Format class.Luke Kanies2008-07-302-96/+186
| | | | | | | | | | | | | | The Format class now takes care of deciding whether it's supported, and it also does method dispatch to classes and instances as necessary. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Searching again works over REST, including full content-type translation.Luke Kanies2008-07-291-3/+6
| | | | | | | | | | | | | | | | | | 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>
* | Fixing the format_handler tests so that they clean up after themselves.Luke Kanies2008-07-291-0/+7
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing a test I broke while rebasingLuke Kanies2008-07-291-0/+5
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing a test to be order-independent.Luke Kanies2008-07-291-1/+1
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding rudimentary support for directly managing formats.Luke Kanies2008-07-293-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | We have a simple Format class, and the FormatHandler module is responsible for managing its instances, including providing access by mime type or name. It will soon replace some of the testing functionality in the FormatHandler module, but for now, it's just there as a name => mimetype converter, which makes it seem a lot like overkill. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding support for rendering and converting multiple instances.Luke Kanies2008-07-291-9/+36
| | | | | | | | | | | | | | It's a touch hackish in terms of design, but it should work, and it's the last major piece of plumbing necessary for REST support. Signed-off-by: Luke Kanies <luke@madstop.com>
* | All error and format handling works over REST except searching.Luke Kanies2008-07-292-4/+23
| | | | | | | | | | | | | | | | | | 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.
* | Drastically simplifying the REST implementation tests.Luke Kanies2008-07-292-627/+189
| | | | | | | | | | | | | | | | | | Nearly all of the tests are now written just once, in the Handler module. The Mongrel and Webrick tests just validate that they provide the interface and how they do so. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding explicit tests for the HTTP::Handler module.Luke Kanies2008-07-291-0/+411
| | | | | | | | | | | | | | | | | | | | | | This will help to remove a ton of duplication among the Mongrel and Webrick tests, and it also helps make the interface between the servers and the handler more explicit, and thus more maintainable. I still need to switch all of the servers over. Signed-off-by: Luke Kanies <luke@madstop.com>
* | The REST terminus now uses the content-type and http result codes.Luke Kanies2008-07-293-37/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Using the FormatHandler in indirected classes automatically.Luke Kanies2008-07-291-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com> Changing the FormatHandler#render method to render_to Signed-off-by: Luke Kanies <luke@madstop.com> Adding the ability for the format handler to query supported formats. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding a FormatHandler module for managing format conversions.Luke Kanies2008-07-291-0/+73
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x' into mergingLuke Kanies2008-07-296-27/+109
|\| | | | | | | | | | | Conflicts: test/ral/type/filesources.rb
| * Fixing #1438 -- mongrel and module tests now pass.Luke Kanies2008-07-201-0/+4
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * You can now select the encoding format when transferring the catalog,Luke Kanies2008-07-181-19/+77
| | | | | | | | | | | | | | | | | | | | with 'yaml' still being the default but 'marshal' being an option. This is because testing has shown drastic performance differences between the two, with up to 70% of compile time being spent in YAML code. Use the 'catalog_format' setting to choose your format, and the setting must be set on the client. Signed-off-by: Luke Kanies <luke@madstop.com>
| * The mongrel-related tests now run without mongrel.Luke Kanies2008-07-175-8/+28
| | | | | | | | | | | | | | | | | | | | | | 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-149-94/+241
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ruby interpreter lines to the tests missing them.Luke Kanies2008-06-132-0/+4
| |
| * Adding execute bits to every test currently missing them.Luke Kanies2008-06-139-0/+0
| |
| * The mongrel and webrick REST handlers now extract certificate information.Luke Kanies2008-06-092-93/+236
| | | | | | | | | | | | | | | | | | | | | | All requests should now have an ipaddress add to them, they should always be marked authenticated or not, and they should have the certificate name set as their 'node' if a certificate is present. They both use the same methods they use for xmlrpc, although there's no common code, to facilitate deprecation of xmlrpc.
* | Merge branch '0.24.x'Luke Kanies2008-05-253-3/+5
|\| | | | | | | | | | | | | Conflicts: CHANGELOG lib/puppet/transaction.rb
| * Fixing an inaccurate test so the tests will run correctly in all branches.Paul Lathrop2008-05-231-3/+1
| |
| * Fixing tests that are broken when running as root under OSX 10.5Paul Lathrop2008-05-232-0/+4
| |
* | Using the new Cacher class for handling cached data.Luke Kanies2008-05-131-18/+1
| | | | | | | | | | This provides a single, global bit for determining whether a given piece of cached data is still valid.
* | Fixing some broken tests.Luke Kanies2008-05-071-0/+10
| | | | | | | | | | | | | | The HttpPool module now removes its cached ssl_host instance when clearing its cache. This is really only useful for testing, but it correctly causes the pool to use new certificates when they're available.