summaryrefslogtreecommitdiffstats
path: root/spec/shared_behaviours/file_serving.rb
Commit message (Collapse)AuthorAgeFilesLines
* maint: remove inaccurate copyright and license statements.Daniel Pittman2011-08-181-4/+0
| | | | | | | | | | | For a while Luke, and other authors, injected a created tag, copyright statement, and "All rights reserved" into every new file they added to the Puppet project. This isn't really true, and we have a global license covering the code, so we have now stripped out all those old tags. Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
* maint: clean up the spec test headers in bulk.Daniel Pittman2011-04-131-1/+1
| | | | | | | We now use a shebang of: #!/usr/bin/env rspec This enables the direct execution of spec tests again, which was lost earlier during the transition to more directly using the rspec2 runtime environment.
* Merge branch '2.6.x' into nextNick Lewis2011-01-061-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Rakefile lib/puppet/resource/type_collection.rb lib/puppet/simple_graph.rb lib/puppet/transaction.rb lib/puppet/transaction/report.rb lib/puppet/util/metric.rb spec/integration/indirector/report/rest_spec.rb spec/spec_specs/runnable_spec.rb spec/unit/configurer_spec.rb spec/unit/indirector_spec.rb spec/unit/transaction/change_spec.rb
| * (#5771) Upgrade rspec to version 2Matt Robinson2011-01-041-1/+1
| | | | | | | | | | | | | | | | | | The biggest change is that we no longer need to monkey patch rspec to get confine behavior. Describe blocks can now be conditional like confine used to be. "describe" blocks with "shared => true" are now "shared_examples_for". Paired-With: Nick Lewis
* | Maint: Refactor tests to use <class>.indirection.<method>Paul Berry2010-11-291-7/+7
|/ | | | | | Replaced uses of the find, search, destroy, and expire methods on model classes with direct calls to the indirection objects. This change affects tests only.
* Fix for #4489 -- apply was using the rest terminusMarkus Roberts2010-08-241-1/+12
| | | | | | | | | | Basing pervasive low-level behaviour changes on the application name isn't a good idea, but if we're going to do it we need to remember to update the test when we rename the application. I am not certain that this change is globally correct; there may be other related problems that will not be fixed (and may in fact be exacerbated) by this patch.
* Code smell: Two space indentationMarkus Roberts2010-07-091-53/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 2875 spurious test failure in spec/integration/file_serving/content.rbJesse Wolfe2009-12-151-1/+1
| | | | | | Any test calling it_should_behave_like "Puppet::FileServing::Files" potentially was affected by this bug, as its stubbing was not sufficient if anything needs to be autoloaded.
* Adding pluginsyncing support to the IndirectorLuke Kanies2009-02-191-3/+4
| | | | | | | | | 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>
* Removing the yaml conversion code from FileContent.Luke Kanies2008-08-261-14/+9
| | | | | | | | 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>
* Fixed all of the fileserving termini so they use indirection requests.Luke Kanies2008-07-181-6/+16
| | | | | | | | 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>
* Intermediate commit.Luke Kanies2008-04-081-6/+6
| | | | | | | | | | | | | | | | | This commit adds a Request instance into the indirection, pushing it all the way to the terminus instances. It's a big commit because it requires modifying every terminus class. There are still some thorny design issues. In particular, who should be responsible for making the request object? I've tried having both the indirection class and the Indirector module creating it, and both have their issues. Also, the Catalog class previously allowed passing Node instances directly to the find method, which is now no longer possible because the Request class would treat the node as the instance being found. We need the request class to have two modes, one when it's passed an instance and one when it's passed a key.
* Copying over Rick's work from the master branch supporting autotest andLuke Kanies2008-02-121-0/+54
cleaning up the rspec support.