summaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
* maint: spec_helper should reset settings directories on *every* testJesse Wolfe2010-07-021-5/+11
| | | | | Previously, spec_helper's attempts to set :confdir, and :vardir to /dev/null were getting thwarted by the Settings.clear in after_all
* maint: Remove a heisentest that wasn't testing what it claimedJesse Wolfe2010-07-021-25/+0
| | | | | | This test in agent_spec.rb was no longer testing any of Puppet::Application::Agent, but rather exercising Util::Settings in a naive way. Deleted.
* maint: spec_helper should only get loaded onceJesse Wolfe2010-07-021-0/+5
| | | | | | Added a C-style if-defined? guard to spec_helper.rb to make sure that it only gets evaluated once. (The file is getting loaded multiple times because ruby gets confused by relative paths in `require` statements)
* [#4090] Fix the run_mode for certs and put tests on the applications to ↵Matt Robinson2010-07-023-1/+15
| | | | | | | assert their run_mode Also cleanup of an unecessary puts line, make master tests run when on their own, and moving a require to a more usual spot.
* [#4059] fix the specs to correctly mock the Puppet::Resource.new call signatureJesse Wolfe2010-07-021-2/+2
|
* [#2713] Enable ELSIFJesse Wolfe2010-07-011-0/+6
|
* [#3172] puppet kick can take hostnames as bare argumentsJesse Wolfe2010-07-011-2/+2
|
* [#4090] Change how RunMode instances are created so that an object for each ↵Matt Robinson2010-07-011-1/+1
| | | | | | | RunMode is only created once instead of every time it's called Got lots of unpredictable test failures, presumably because a new RunMode was being created every time we accessed the RunMode.
* [#4090] Fix last few tests and renames of mode to run_modeMatt Robinson2010-07-011-10/+0
|
* [#4090] Git rid of the idea that run_mode is a configurable option with defaultsMatt Robinson2010-07-013-9/+66
| | | | | Along the way this fixes an issue with 2.6 alpha that sections of the puppet config file were getting ignored.
* [#4090] Rename mode (:master, :agent, :user) to run_modeMatt Robinson2010-07-016-31/+31
| | | | | | | | Mode is a terribly overused word. Files use it, puppetdoc uses it, and certs use it, and those are just the places that I happened to stumble upon. It makes reading code very confusing and finding things in code difficult. I know namespacing allows us to reuse words for method and variable names, but that doesn't mean we should.
* [#3961] Rename cert's @mode to @cert_mode to reduce confusionJesse Wolfe2010-06-301-14/+14
|
* maint: Confine a test that depends on sqliteMatt Robinson2010-06-281-0/+1
| | | | I'm also going to update the wiki to mention sqlite is a test dependency
* [#3994-part 3] rename spec tests from *_spec_spec to *_spec.rbMarkus Roberts2010-06-28344-0/+0
| | | | Part 2 re-did the change on the spec files, which it shouldn't have.
* Fix for test ordering sporadic failureMarkus Roberts2010-06-281-1/+1
| | | | | The spec/unit/provider/ssh_authorized_key/parsed_spec_spec.rb was trying to use Dir.tempdir but getting ours.
* [#3994-part 2] rename integration tests to *_spec.rbMarkus Roberts2010-06-28397-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
* Merge branch 'testing' into tweak/testing/file_fix_root_spec_failureMarkus Roberts2010-06-288-18/+16
|\
| * Merge branch 'testing' into tweak/testing/silence_spec_outputMarkus Roberts2010-06-285-11/+13
| |\
| | * maint: Fixing tests that fail when run as rootMatt Robinson2010-06-281-0/+2
| | | | | | | | | | | | | | | | | | | | | Commit ae520057280c2454bc44c64ac1e6686bf2eb086d introduced some code that used 'asuser' which does nothing when not run as root, but in these tests tries to run as a non-existent user. Stubbing out the asuser method to just yield prevents test failures when running as root.
| | * Cleaning up various warnings in specsMarkus Roberts2010-06-284-11/+11
| | | | | | | | | | | | | | | There were a bunch of "warning: parenthesize argument(s) for future version" messages; now there aren't.
| * | maint: Fixes some noisy specsNick Lewis2010-06-283-7/+3
| |/ | | | | | | | | This change removes some irrelevant output (debugging information, warnings, etc) from a few specs.
* / maint: A test specified that a file wasn't writeable, but was writeableMatt Robinson2010-06-281-1/+2
|/ | | | | | when run as root, which caused the test to fail. Changing the test so that a directory is in place of the writeable file so not even root can write to it.
* Removing obsolete nodescope conceptLuke Kanies2010-06-281-6/+0
| | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fix #3665 - part 2, node inheritance fixesBrice Figureau2010-06-281-0/+41
| | | | | | | | We were looking only to the class hierarchies when trying to find an ancestor to the current type. Thus we were never trying to climb up the hierarchy of nodes when evaluating nodes. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix failing tests in spec/unit/resources/type.rbBrice Figureau2010-06-281-3/+2
| | | | Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #3665 - main class shouldn't be a subscope of itselfBrice Figureau2010-06-281-0/+8
| | | | | | | | During the refactoring of AST hostclass/node to non AST objects, we lost the fact that the main class already comes with a scope (ie the top one), so when we evaluate its code we shouldn't create a subscope for it. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* maint: Fixes broken order-dependent Tidy specsNick Lewis2010-06-281-4/+4
| | | | | | A few specs were using a global variable rather than a local, causing an order-dependent failure in which they were replacing the object under test.
* Fix for pre 1.8.7 compatibility in namvar patchMarkus Roberts2010-06-281-7/+4
| | | | | | | | There was a subtle 1.8.7 dependence in the composite key / namevar patch; Nick discovered that our assumtion that hashes could be used as hash keys does not hold in earlier bersions of ruby. This patch replaces the hash valued uniqueness_key with an array of the values of the (ordered) key attributes.
* Fix tests broken by level-violation fixJesse Wolfe2010-06-251-2/+0
|
* Simplify the newattr method by removing a level violationJesse Wolfe2010-06-251-8/+0
| | | | and update the specs that were testing it.
* maint: Rework testing of Reports http processor to be self containedRein Henrichs2010-06-251-5/+19
| | | | | * do not monkey patch Net::HTTP in a way that breaks other specs * Use fakes to sense behavior of Net::HTTP
* [#3139] Fixed a broken integration spec in type tidyNick Lewis2010-06-251-0/+5
| | | | | A change to the way host_config is determined caused this spec to call store when it didn't before, so it needed to be mocked.
* maint: Fixing test to reflect that host environment assignment now takes an ↵Matt Robinson2010-06-251-1/+1
| | | | object instead of a string
* Fix some tests broken by changing the call to newattrJesse Wolfe2010-06-251-2/+2
|
* Fixing oversensitive testMarkus Roberts2010-06-241-1/+1
| | | | The test checked for false when all we cared about was that it was not truthy.
* maint: Fix failing test that needed more methods stubbedMatt Robinson2010-06-241-2/+2
|
* [#4006] Fix test failures caused by reverting ticket 2890Matt Robinson2010-06-241-1/+1
| | | | | | | | | When Markus reverted changes made by 2890 he reintroduced a method certificate_matches_key? that then caused failures in network/xmlrpc/client.rb. I just stubbed that method to return true since the failing tests weren't trying to test that methods behavior. Reviewed-by: Markus Roberts
* Tweak for fix for #1175 to fix test failuresMarkus Roberts2010-06-241-0/+2
| | | | | | Tests that weren't managing the environment but were still expecting to have functions defined in it were appalled when the functions/environments binding actually started working. This patch fixes those tests.
* maint: Fixing a failing spec by stubbing a method on a stubbed object that ↵Matt Robinson2010-06-241-0/+1
| | | | | | | should have been stubbed. This failure was introduced in commit 94390de11d046d4906842f33aa9865f6c3835633, which just had the message 'foo'.
* remove tests for removed codeJesse Wolfe2010-06-241-24/+0
|
* [#2646] Fixes the change to onetime made in b96cd6cNick Lewis2010-06-241-3/+4
| | | | | | This change allows the --onetime command line option to be set by the Puppet[:onetime] global option or read from the config file, rather than forcing it to be read from the config file.
* [#3994] rename the specs to have _spec.rb at the endMarkus Roberts2010-06-23344-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
* [#4064] Modify the Rails spec to use the block form of confineRein Henrichs2010-02-171-1/+1
| | | | | | This prevents the lookup of the ActiveRecord constant from being performed until after we know that the Rails feature is available (from checking the confine of the parent describe block).
* [#4064] Modify confine to also allow a message and a block containing the test.Rein Henrichs2010-02-171-0/+95
| | | | | This way the test can be evaluated lazily when needed. Adds tests and documentation.
* Fix #3932 - Add --charset to puppetdoc for RDoc modeBrice Figureau2010-02-172-4/+17
| | | | | | | This adds the --charset option to puppetdoc for RDoc mode. This allows to set the charset for the generated html. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #3907 - Hash couldn't be initialized with an empty hashBrice Figureau2010-02-171-0/+12
| | | | | | | | | | The following manifest was failing: $data = {} This patch makes sure we initalize our ast hash with an empty ruby hash when it is created without any values. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #3871 - Add the 'in' operatorBrice Figureau2010-02-172-1/+62
| | | | | | | | | | | | | | | | | | | | | | | This operator allows to find if the left operand is in the right one. The left operand must be resort to a string, but the right operand can be: * a string * an array * a hash (the search is done on the keys) This syntax can be used in any place where an expression is supported. Syntax: $eatme = 'eat' if $eatme in ['ate', 'eat'] { ... } $value = 'beat generation' if 'eat' in $value { notice("on the road") } Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* [#3865] External subcommandsJesse Wolfe2010-02-171-0/+22
| | | | | This patch allows the puppet single-executable to invoke external, hyphenated subcommands, much like how git does.
* [#3766] Remove YAML fixupsJesse Wolfe2010-02-171-42/+0
| | | | | Remove workarounds that were only needed because ruby's builtin YAML lib is broken.
* Provides #3723. Add ability for execs to have several attempts at a successfulNigel Kersten2010-02-171-3/+38
| | | | | | | | | execution and fix minor bug with logoutput and returns as an array.. * Add 'tries' and 'try_sleep' parameters * Fix bug where returns is specified as an array and logoutput on * failure. * unit tests for both cases above.