summaryrefslogtreecommitdiffstats
path: root/spec/integration/file_serving
Commit message (Collapse)AuthorAgeFilesLines
* Code smell: Two space indentationMarkus Roberts2010-07-094-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced 106806 occurances of ^( +)(.*$) with The ruby community almost universally (i.e. everyone but Luke, Markus, and the other eleven people who learned ruby in the 1900s) uses two-space indentation. 3 Examples: The code: end # Tell getopt which arguments are valid def test_get_getopt_args element = Setting.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args") becomes: end # Tell getopt which arguments are valid def test_get_getopt_args element = Setting.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args") The code: assert_equal(str, val) assert_instance_of(Float, result) end # Now test it with a passed object becomes: assert_equal(str, val) assert_instance_of(Float, result) end # Now test it with a passed object The code: end assert_nothing_raised do klass[:Yay] = "boo" klass["Cool"] = :yayness end becomes: end assert_nothing_raised do klass[:Yay] = "boo" klass["Cool"] = :yayness end
* [#3994-part 2] rename integration tests to *_spec.rbMarkus Roberts2010-06-284-0/+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
* Fixing 2862 spec/integration/file_serving/metadata.rb fails unless run with ↵Jesse Wolfe2009-12-111-0/+1
| | | | | | | | | other tests Due to some heavy mocking, this code was failing to load a dependency. If the `require` happens earlier, then the test passes. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Adding pluginsyncing support to the IndirectorLuke Kanies2009-02-191-43/+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>
* Changing the Cacher.invalidate method to Cacher.expire.Luke Kanies2008-11-113-4/+4
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing FileServing::Base so that it can recurse on a single file.Luke Kanies2008-08-272-0/+36
| | | | | | | 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>
* Refactoring how files in FileServing are named.Luke Kanies2008-08-261-0/+2
| | | | | | | | | | | | | | | | | 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>
* Removing the yaml conversion code from FileContent.Luke Kanies2008-08-261-0/+2
| | | | | | | | 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>
* FileServing Configurations now expect unqualified files.Luke Kanies2008-08-261-2/+2
| | | | | | | | | | | 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>
* Merge branch '0.24.x' into mergingLuke Kanies2008-07-291-1/+0
|\ | | | | | | | | | | Conflicts: test/ral/type/filesources.rb
| * Fixed all of the fileserving termini so they use indirection requests.Luke Kanies2008-07-181-1/+0
| | | | | | | | | | | | | | | | 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-131-2/+2
|/ | | | | This provides a single, global bit for determining whether a given piece of cached data is still valid.
* Fixing a test that was failing when a user-specificLuke Kanies2008-02-231-2/+2
| | | | fileserver.conf actually exists.
* Fixing #924 -- clearing the configuration cache before andLuke Kanies2007-11-261-0/+3
| | | | after the test.
* File serving now works. I've tested a couple of ways toLuke Kanies2007-10-191-0/+40
| | | | | | | | | | | | | | | | use it, and added integration tests at the most important hook points. This provides the final class structure for all of these classes, but a lot of the class names are pretty bad, so I'm planning on going through all of them (especially the file_server stuff) and renaming. The functionality is all here for finding files, though (finally). Once the classes are renamed, I'll be adding searching ability (which will enable the recursive file copies) and then adding the link management and enabling ignoring files.
* I've now split the file-serving termini into two separate types (inLuke Kanies2007-10-182-0/+37
addition to Rest): A local terminus that just uses direct file paths, and a mounts terminus that uses the file server to figure out what the path should be. It looks like it also makes sense to split the 'mounts' terminus further, so there is a 'modules' terminus used to look files up in the terminus. I've added some integration tests to verify that everything is hooked together correctly. Lastly, I added a directory for shared behaviours. There's a ton of duplication in this setup, because the Content and Metadata classes behave almost but not quite identically across the board.