| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Along the way this fixes an issue with 2.6 alpha that sections of the
puppet config file were getting ignored.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
I'm also going to update the wiki to mention sqlite is a test dependency
|
|
|
|
| |
Part 2 re-did the change on the spec files, which it shouldn't have.
|
|
|
|
|
| |
The spec/unit/provider/ssh_authorized_key/parsed_spec_spec.rb was trying to
use Dir.tempdir but getting ours.
|
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
There were a bunch of "warning: parenthesize argument(s) for future version"
messages; now there aren't.
|
|/
|
|
|
| |
This change removes some irrelevant output (debugging information,
warnings, etc) from a few specs.
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
and update the specs that were testing it.
|
|
|
|
|
| |
* do not monkey patch Net::HTTP in a way that breaks other specs
* Use fakes to sense behavior of Net::HTTP
|
|
|
|
| |
object instead of a string
|
| |
|
|
|
|
| |
The test checked for false when all we cared about was that it was not truthy.
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
should have been stubbed.
This failure was introduced in commit 94390de11d046d4906842f33aa9865f6c3835633,
which just had the message 'foo'.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
This patch allows the puppet single-executable to invoke external,
hyphenated subcommands, much like how git does.
|
|
|
|
|
| |
Remove workarounds that were only needed because ruby's builtin YAML
lib is broken.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Change Autoloader's load to re-raise exceptions that happen when
trying to load files, rather than just warning.
This version still does not raise an error if the file is not found, as
doing so would change the behavior of 'load' pretty significantly, but I
am ambivalent this.
|
|
|
|
|
|
|
| |
Change Autoloader's loadall to re-raise exceptions that happen when
trying to load files, rather than just warning.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
| |
Class namespace is different than namespace of nodes and definition as
it contains the whole qualified name.
This bit was left out in the type are not AST anymore refactoring.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows you to create builtin nested resource types
that generate other resources that generate other resources
ad naseum.
The primary point of this feature is that you can make
builtin resource types that have a lot of the same
encapsulation abilities of defined resource types.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|
|
|
|
|
|
|
| |
This disables adding any code to 'main' except
in site.pp, so if you have code outside of a node,
class, or define it will throw an exception.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will produce the name of the module that a given
resource is defined in, rather than the module that
the resource type itself is defined in. For instance:
# in one/manifests/onedef.pp
define one::onedef {
notice "Called $name from $caller_module_name"
}
# in two/manifests/init.pp
class two {
one::onedef { yay: }
}
produces:
Called yay from two
This could obviously be extended to actually build a caller
stack, as frightening as that seems.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is only true for resource types (e.g., classes and defines)
of course.
The actual variable is 'module_name':
class mymod {
notify { "in mymod '$module_name'": }
}
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
|
|
|
|
| |
Prevents unmet dependency problems when running tests without the
couchrest gem
|