Age | Commit message (Collapse) | Author |
|
* Re-arranged tests in line with puppetlabs-stdlib
|
|
The accounts module is making use of validate_array() and
validate_string() which do not exist int he stdlib module without this
patch.
This patch adds the two functions to the stdlib with unit tests.
Reviewed-by: Dan Bode
|
|
In Puppet, it is not possible to reassign hash
values.
This function allows a reasonable way to perform
hash munging in Puppet.
Reviewed-by: Jeff McCune
|
|
It is difficult to use existance of keys in a hash
as a boolean condition in Puppet (see #8705)
This function provides a working solution until
the underlying issue in Puppet can be resolved.
Reviewed-by: Jeff McCune
|
|
These tests run through a number of example cases and exercise the
behavior of the validate_hash function.
To run, simple execute rspec validate_hash_spec.rb
|
|
This isn't directly related to #8010, but rather indirectly fills the
need to allow the end user to configure where data values are looked up.
This allows the namespace to be passed as a class parameter. A module
may then quickly and easily look up data from the user-defined
namespace.
|
|
|
|
This is an interesting spec test for module developers.
It illustrates how to cause Puppet to test the function
from the Puppet DSL rather than the Ruby DSL, fully
exercising the system from the perspective of the end
user.
(Note how Puppet[:code] is set, then the scope reset, then
the compile method called.)
Paired-with: Dan Bode <dan@puppetlabs.com>
|