summaryrefslogtreecommitdiff
path: root/spec/shared_behaviours
AgeCommit message (Collapse)AuthorFilesLines
2011-03-23Merge branch '2.6.next' into nextMax Martin1-0/+185
* 2.6.next: Fixed #6562 - Minor kick documentation fix (#6658) Propagate ENC connection errors to the agent (#4884) Remove typo from spec test (#4884) Modify tests to pass on non-OS X systems (#4884) Revise new exec tests, add a few more (#4884) Add an shell provider for execs (#4884) Fix Test::Unit exec tests (#4884) Break the exec type out to have a posix provider (#4884) Add consistent path validation and behavior (#4884) Add expand_path to requiring the spec_helper (#4884) Autorequire shared behaviors and method to silence warnings (#4884) Fix whitespace (#4884) Get rid of open3 require since it wasn't being used (#5814) Improved cron type specs (#5814) cron_spec shouldn't depend on cron provider Manually Resolved Conflicts: lib/puppet/util/command_line/puppetrun spec/spec_helper.rb spec/unit/type/exec_spec.rb spec/unit/type_spec.rb test/ral/type/exec.rb
2011-03-15(#4884) Add consistent path validation and behaviorDaniel Pittman1-0/+185
Many path parameters were implementing their own inconsistent validation and behavior. Now those parameters can have a parent class that makes things a lot more consistent. Reviewed-by: Matt Robinson and Max Martin
2011-03-03(#6582) eliminate fakeparsefile helper method.Daniel Pittman1-0/+21
This was a helper that implemented rspec style "shared behaviour" for Test::Unit; now that we have moved on we can use the upstream implementation instead. This eliminates a whole bit of code we have to maintain. Reviewed-By: Nick Lewis <nick@puppetlabs.com>
2011-01-06Merge branch '2.6.x' into nextNick Lewis3-3/+3
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
2011-01-04(#5771) Upgrade rspec to version 2Matt Robinson3-3/+3
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
2010-11-29Maint: Refactor tests to use <class>.indirection.<method>Paul Berry1-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.
2010-08-24Fix for #4489 -- apply was using the rest terminusMarkus Roberts1-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.
2010-07-09Code smell: Two space indentationMarkus Roberts3-103/+103
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
2009-12-152875 spurious test failure in spec/integration/file_serving/content.rbJesse Wolfe1-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.
2009-02-19Adding pluginsyncing support to the IndirectorLuke Kanies2-4/+5
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>
2008-12-20Fix #1834 part1 - Fix tempfile failing testsBrice Figureau1-1/+2
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
2008-11-11Changing the Cacher.invalidate method to Cacher.expire.Luke Kanies1-1/+1
Signed-off-by: Luke Kanies <luke@madstop.com>
2008-08-26Adding automatic attribute collection to the new fileserving code.Luke Kanies1-9/+11
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>
2008-08-26Removing the last vestiges of the 'puppetmounts' protocol marker.Luke Kanies1-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>
2008-08-26Removing the yaml conversion code from FileContent.Luke Kanies1-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>
2008-07-29Merge branch '0.24.x' into mergingLuke Kanies2-7/+19
Conflicts: test/ral/type/filesources.rb
2008-07-18Fixed all of the fileserving termini so they use indirection requests.Luke Kanies2-7/+19
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>
2008-05-13Using the new Cacher class for handling cached data.Luke Kanies1-1/+1
This provides a single, global bit for determining whether a given piece of cached data is still valid.
2008-04-08Intermediate commit.Luke Kanies2-6/+38
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.
2008-02-12Copying over Rick's work from the master branch supporting autotest andLuke Kanies2-0/+94
cleaning up the rspec support.