summaryrefslogtreecommitdiffstats
path: root/spec/unit/file_serving
Commit message (Collapse)AuthorAgeFilesLines
* Fix #2424 - take 2, make sure default mounts allow every clientsBrice Figureau2009-07-211-0/+13
| | | | | | | | If there isn't any default mounts for plugins/modules, puppet auto creates them. The issue is that they don't have any authorization attached, so they default to deny all. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #2424 - File server can't find module in environmentBrice Figureau2009-07-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Actually, the issue is: * when the web server gets the request, it creates an indirection request, filling attributes like ip or node from the HTTP request. To do this, all the interesting attributes are given in a hash (called options, see P::I::Request#new). Once the request is properly initialized the options hash doesn't contain the ip or node information (see set_attributes) * the request is then transmitted to the file_serving layer, which happily wants to use the node attribute to find environments or perform authorization. Unfortunately it fetches the node value from the request options hash, not the request itself. Since this node information is empty, puppet fails to find the proper mount point, and fails the download. This change makes sure we pass all the way down the node and fix the authorization check. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix small typo in the fix for #2394Brice Figureau2009-07-181-1/+1
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixed #2394 - warn once on module mount deprecation.Sam Livingston-Gray2009-07-131-1/+1
| | | | Signed-off-by: Sam Livingston-Gray <geeksam@gmail.com>
* Add test for current module mount deprec warning.Sam Livingston-Gray2009-07-131-1/+2
|
* Modules now can find their own pathsLuke Kanies2009-05-151-2/+2
| | | | | | | | | | | | Previously, when you created a module you had to specify the path. Now Module instances can use the module path to look up their paths, and there are methods for determining whether the module is present (if the path is present). Also cleaned up the methods for figuring out what's in the module (plugins, etc.). Signed-off-by: Luke Kanies <luke@madstop.com>
* Fix #2101 - fix recurselimit == 0 bad behaviourBrice Figureau2009-03-271-3/+3
| | | | | | | After the fix for #1469, recurselimit = 0 was considered as an infinite recursion which is the reverse of what it was before. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #1469 - Add an option to recurse only on remote sideBrice Figureau2009-03-201-18/+34
| | | | | | | | | | | | | | | | | | | When using recurse and a source, if the client side has many files it can take a lot of CPU/memory to checksum the whole client hierarchy. The idea is that it is not necessary to recurse on the client side if all we want is to manage the files that are sourced from the server. This changeset adds the "remote" recurse value which prevents recursing on the client side when a source is present. Since it also is necessary to limit the remote side recursion a new File{} parameter has been added called "recurselimit". Moreover, the Filetset API is changing to allow the new recurselimit parameter, and passing the recursion depth limit in the recurse parameter as an integer is now deprecated and not supported anymore. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Moving default fileserving mount creation to the Configuration classLuke Kanies2009-03-052-12/+15
| | | | | | | | | | It was previously in the parser, but the parser is only created if the fileserver.conf exists, so the default mounts weren't made if the file didn't exist. This is a bit less encapsulation, but not much. Signed-off-by: Luke Kanies <luke@madstop.com>
* Correctly handling URI escaping throughout the REST processLuke Kanies2009-02-191-6/+6
| | | | | | | | | | This means, at the least, that we can now serve files via REST when they have spaces and other weird characters in their names. This involves a small change to many files. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding pluginsyncing support to the IndirectorLuke Kanies2009-02-197-289/+498
| | | | | | | | | 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>
* Moving Request and Fileset integration into Fileset.Luke Kanies2009-02-192-22/+39
| | | | | | | It was previously in a helper module, TerminusHelper. I hope to actually remove that module entirely. Signed-off-by: Luke Kanies <luke@madstop.com>
* Supporting multiple paths for searching for files.Luke Kanies2009-02-181-18/+22
| | | | | | | This is, once again, used for plugins, which needs to search across multiple modules' plugin directories. Signed-off-by: Luke Kanies <luke@madstop.com>
* Adding support for merging multiple filesets.Luke Kanies2009-02-181-0/+43
| | | | | | | This is required for plugins, which recurse across multiple directories. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing fileserving to support strings or symbolsLuke Kanies2009-02-181-0/+4
| | | | | | | When used internally we would use symbols, but the REST transfers need to support strings. Signed-off-by: Luke Kanies <luke@madstop.com>
* Changing the Cacher.invalidate method to Cacher.expire.Luke Kanies2008-11-112-5/+5
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Deduplicating slashes in the fileserving codeLuke Kanies2008-11-041-0/+5
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Merge branch '0.24.x' Removed the 'after' blocks that call Type.clear,Luke Kanies2008-10-172-5/+26
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix metadata class for cases when checksum_type setPaul Nasrat2008-09-301-1/+17
| |
| * Fix ticket 1596 in new fileset code, use tmpdir in fileserver tests.Paul Nasrat2008-09-301-0/+9
| |
* | Fixing filesets to allow nil ignore values.Luke Kanies2008-08-281-0/+7
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing FileServing::Base so that it can recurse on a single file.Luke Kanies2008-08-271-0/+5
| | | | | | | | | | | | | | It was throwing exceptions if you tried to use it on a file instead of a directory. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing the terminus helper so it correctly catches options passed from ↵Luke Kanies2008-08-261-0/+21
| | | | | | | | | | | | clients via REST. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding a "source" attribute to fileserving instances.Luke Kanies2008-08-261-0/+6
| | | | | | | | | | | | | | This will be used to cache the source that was used to retrieve the instance. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding automatic attribute collection to the new fileserving code.Luke Kanies2008-08-263-20/+47
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Adding the content writer to the content class.Luke Kanies2008-08-261-0/+28
| | | | | | | | | | | | | | Also choosing a fully qualified fake name when creating content instances from raw content. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Removing the last vestiges of the 'puppetmounts' protocol marker.Luke Kanies2008-08-261-1/+1
| | | | | | | | | | | | | | I created this when I first designed the fileserving Indirection hooks, and it's unnecessary. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing the rest backends for webrick and mongrel so the get the whole ↵Luke Kanies2008-08-261-1/+11
| | | | | | | | | | | | | | | | | | request key. Also adding the Content work necessary to demonstrate that this is actually required. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Refactoring how files in FileServing are named.Luke Kanies2008-08-264-67/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Finishing the rename of FileBase => Base.Luke Kanies2008-08-262-2/+126
| | | | | | | | | | | | | | | | | | | | | | Git did something really strange, in that it apparently didn't add the new base.rb files even though I used 'git mv'. Also fixing some other failing tests I hadn't previously tracked down because of the magical tuple of autotest's suckiness and my laziness. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Renaming FileServing::FileBase to FileServing::Base.Luke Kanies2008-08-263-126/+16
| | | | | | | | | | | | | | | | Also fixing a set of tests I broke last night. I'm looking at replacing autotest with rspactor, because my FSEvents hack to autotest means it's harder for me to rerun autotest. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Removing the yaml conversion code from FileContent.Luke Kanies2008-08-261-24/+0
| | | | | | | | | | | | | | | | Also fixing some integration tests that were failing because of the change to the terminus selection code for file serving. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Correcting whitespace in a testLuke Kanies2008-08-261-3/+3
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | FileServing Configurations now expect unqualified files.Luke Kanies2008-08-261-17/+22
| | | | | | | | | | | | | | | | | | | | | | This fits in with the fact that the indirection requests split URIs and set the request key to an unqualified path rather than a fully-qualified path. The whole system is unqualified end-to-end, now, except when you're specifically asking for a full, local file name. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing whitespace in docs of some tests.Luke Kanies2008-08-261-4/+4
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing the fileserving terminus selection hook.Luke Kanies2008-08-261-78/+78
| | | | | | | | | | | | | | It now uses the fact that the indirection request does URI parsing, rather than doing the parsing on its own. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Merge branch '0.24.x' into mergingLuke Kanies2008-07-291-48/+46
|\| | | | | | | | | | | Conflicts: test/ral/type/filesources.rb
| * Fixed all of the fileserving termini so they use indirection requests.Luke Kanies2008-07-181-48/+46
| | | | | | | | | | | | | | | | 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>
* | Using the new Cacher class for handling cached data.Luke Kanies2008-05-132-7/+7
|/ | | | | This provides a single, global bit for determining whether a given piece of cached data is still valid.
* Fixing the tests that were failing because of the useLuke Kanies2008-04-081-95/+109
| | | | of the indirection request object.
* Fixes #1148 - replaces #!/usr/bin/ruby with #!/usr/bin/env ruby.Paul Lathrop2008-03-282-2/+2
|
* Fixing #1093 -- 0.23.2 clients are again compatibleLuke Kanies2008-02-281-1/+5
| | | | | with 0.24.x servers. :ignore links is now equivalent to :manage links.
* Somewhat refactored fileserving so that it no longer cachesLuke Kanies2008-02-232-69/+125
| | | | | | | | | | any objects, nor does it use Puppet's RAL resources. In the process, I fixed #894 (you can now copy links) and refactored other classes as necessary. Mostly it was fixing tests. This is a squashed commit of a temporary branch, fwiw, and it also includes any fixes to the tests that were necessary to get all tests passing again.
* converting file serving configuration specs from setup/teardown to before/afterRick Bradley2008-02-181-196/+193
|
* converting fileserving/configuration/parser specs from setup/teardown to ↵Rick Bradley2008-02-181-86/+89
| | | | before/after
* Fixing a failing test that resulted from a changeLuke Kanies2008-02-181-1/+2
| | | | in how checksums are created.
* File serving should work now, both recursive andLuke Kanies2007-10-244-135/+129
| | | | | | | | | | | | | | single files, across modules, local file system, and the traditional file server. This work revolves around making sure that the termini produce functional file instances, meaning that they know how to find their content or metadata, which largely comes down to setting their paths correctly. I also created a new terminus base class for the local filesystem, since there was so much common code between content and metadata.
* Renaming the FileServing TerminusSelector module to IndirectionHooks,Luke Kanies2007-10-223-9/+9
| | | | because I'm going to add some hooks for transforming returned objects.
* Renaming the :local termini for metadata and contentLuke Kanies2007-10-221-7/+7
| | | | to :file.
* Link handling is now in the file serving classes.Luke Kanies2007-10-224-39/+225
| | | | | | | | | | This was done by putting all of the functionality in the Content and Metadata class (actually, in a new base class for them). There are still some issues, and there need to be integration tests between the :local (soon to be renamed :file) termini for these classes.