Age | Commit message (Collapse) | Author |
|
(FM-6019) - i18N tests for Spike
|
|
Allow test module metadata.json to be read
|
|
Fix acceptance test failure "Hiera is not a class"
|
|
Due to [BKR-969](https://tickets.puppetlabs.com/browse/BKR-969) the global `Hiera`
symbol is corrupted. Loading puppet before beaker fixes that.
|
|
Fix unsupported data type error with rspec-puppet master
|
|
|
|
Since puppetlabs/puppet@f2e8e66, the test module's metadata.json is also
read causing expectation failures. Like 5c51463, permit it to be read by
Puppet.
|
|
The symbol used in the value of the facts hash is not a valid type of
value for facts, and results in the following error since
rspec-puppet@d50acf0e.
Puppet::Error:
Unsupported data type: 'Symbol'
# puppet/lib/puppet/parser/scope.rb:788:in `deep_freeze'
# puppet/lib/puppet/parser/scope.rb:781:in `block in deep_freeze'
# puppet/lib/puppet/parser/scope.rb:781:in `each'
# puppet/lib/puppet/parser/scope.rb:781:in `deep_freeze'
# puppet/lib/puppet/parser/scope.rb:764:in `set_facts'
# puppet/lib/puppet/parser/compiler.rb:850:in `set_node_parameters'
# puppet/lib/puppet/parser/compiler.rb:166:in `block (2 levels) in compile'
# puppet/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
# puppet/lib/puppet/util/profiler.rb:51:in `profile'
# puppet/lib/puppet/parser/compiler.rb:166:in `block in compile'
# puppet/lib/puppet/context.rb:65:in `override'
# puppet/lib/puppet.rb:293:in `override'
# puppet/lib/puppet/parser/compiler.rb:162:in `compile'
# rspec-puppet/lib/rspec-puppet/example/function_example_group.rb:161:in `build_compiler'
The fact's presence doesn't change the behaviour, so remove it.
|
|
|
|
|
|
|
|
|
|
|
|
(MODULES-4188) Add UUID generation function
|
|
HAIL9000/issue/master/MODULES-3829_add_tests_for_ensure_resources
(MODULES-3829) Add tests for ensure_resources
|
|
Prior to this commit, if a hash was passed in as an
argument to the ensure_packages function a method of
hash duplication would be used that is not supported
with versions of ruby older than 2.0. In order to
ensure the method is compatible with older ruby versions,
switch to a different method of duplication.
Additionally add tests to prevent further regressions.
|
|
* Generates UUID based on a given FQDN string and the DNS namespace (6ba7b810-9dad-11d1-80b4-00c04fd430c8)
|
|
Prior to this commit, we didn't have tests for the ensure_resources
function (only for the ensure_resource function). This meant that
we weren't catching a bug in the ensure_resources function. In order
to prevent this in the future, add some tests which test the
specific functionality of ensure_resources.
|
|
|
|
|
|
|
|
Handle array values in join_keys_to_values function
|
|
These were caused by a change in the tested error message.
|
|
This also updates all ipv4 tests to use the same test data for better
comparability. Closes #676, #679
Fix-Originally-By: Nate Potter <nathaniel.potter@intel.com>
|
|
@keymone added information on how to reproduce his issue, so here's the
test case that would fail without his change.
|
|
Type updates
|
|
|
|
Prior to this commit, due to a bug in the exists? method in the
file_line provider, match_for_absence didn't work as described (or
at all really). Update the exists? logic so that match_for_absence
works as described.
Additionally add a unit test to prevent regressions and update the
documentation for the parameter to reflect the fact that it is
ignored when `ensure => present`.
|
|
|
|
This is the idiomatic version of #634, and also addresses
the test failures.
Original-Fix-By: Michiel Brandenburg <michiel@silverstreet.com>
|
|
When validate_string is called via the Puppet 4 deprecation wrappers
from deprecation_gen (introduced in 970852d), `undef` is passed as `nil`
where it was previously passed as `''` from the Puppet 3-style function
API.
This change explicitly permits a `nil` value in validate_string, and
adds a test case to `is_string` which also accepts the same.
Fixes test failures in apt, concat etc:
Error while evaluating a Function Call, nil is not a string. It looks to be a NilClass at apt/manifests/source.pp:23:3 [..]
# ./spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_string.rb:34:in `block (2 levels) in <module:Functions>'
# ./spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_string.rb:32:in `each'
# ./spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_string.rb:32:in `block in <module:Functions>'
# puppet-4.7.0/lib/puppet/parser/functions.rb:174:in `block (2 levels) in newfunction'
# puppet-4.7.0/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
# puppet-4.7.0/lib/puppet/util/profiler.rb:51:in `profile'
# puppet-4.7.0/lib/puppet/parser/functions.rb:167:in `block in newfunction'
# ./spec/fixtures/modules/stdlib/lib/puppet_x/puppetlabs/stdlib/deprecation_gen.rb:13:in `block (2 levels) in deprecation_gen'
|
|
|
|
|
|
|
|
Add deprecation warnings to remaining validates
|
|
|
|
|
|
Ensure validate functions use Puppet 4 deprecation
|
|
|
|
Refactor dig44 function
|
|
* validate_legacy now accepts undef values
* update the TypeMismatch message to include the original validate function name
* only notice, not warn, on newly allowed values
* changed previous_validation to function_name to avoid confusion with the function of the same name
* use deprecation() instead of warn(), when hitting a deprecated value
* prepare the tests and function for MODULES-3735
* rewrite validate_legacy tests to use new rspec-puppet
* move validate_re deprecation to puppet4 only
* adapt validate_re_spec
|
|
|
|
Deprecation function to be mutable in all cases
|
|
|
|
|
|
The current implementation of the dig44 function has the
following problems:
* Doesn't recognise Puppet4's :undef value as an empty value
and doesn't return the default value.
* Doesn't make a different between false and nil value
and returns the default value for a non-empty false value
|
|
|
|
(MODULES-3534) Deprecation of ip functions
|
|
|
|
(maint) Switch 3.x deprecation() to use Puppet warning logger
|