Age | Commit message (Collapse) | Author |
|
|
|
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
|
|
The deprecation function was calling the `Kernel#warn` function which
prints to stderr, rather than the Puppet logger. This causes problems
for Puppet module tests on Travis CI, which has a cap on the amount of
stdout/err permitted in its logs and also prevents users from finding
the deprecation warnings when running under a Puppet master.
|
|
This updates the test to match the new behaviour in puppet 4.6.0
|
|
|
|
|
|
|
|
|
|
|
|
(MODULES-3529) add deprecation function
|
|
|
|
(MODULES-3568) Move dig to dig44 and deprecate dig
|
|
A new version of dig was introduced in Puppet 4.5.0 that
isn't compatible with the stdlib version of dig. To maintain
backwards compatibility and ensure that tests for stdlib aren't
broken, this patch renames dig to dig44 and adds a deprecation
warning to the stdlib dig function.
|
|
This change more accurately reflects what is being ignored and what's
required as fixtures.
|
|
When replacing the lib/ and manifests/ symlinks in the fixtures with
a proper top-level symlink, puppet 4 starts loading the metadata.json
before loading functions, which confuses these tests. Added more specific
expectations, and provide data for that call.
|
|
|
|
As described in PUP-6422,
ensure_resources('File[/tmp/a]', { owner => undef })
would not actually create the file. This fixes it, and adds tests to prove
it.
|
|
To maintain backwards compatibility, add a delete_regex function instead
of modifying delete itself.
|
|
Add the default value to the "loadyaml" function
|
|
(MODULES-1439) Adds any2bool function
|
|
|
|
Mergeback 4.12.x
|
|
* Basically a combination of `string2bool` and `num2bool`
|
|
* Add shell_escape function, shell_join function & shell_split function
|
|
This value will be returned if the is no file
to load or a file could not be parsed.
It's similar to the "parseyaml" function's
default value.
Add the "loadjson" function too
|
|
This spec should verify that substring matches are not removed in the
future
|
|
This reverts commit 0d46515b57cea60d4d5f1e4d81a75a448a7a73a8.
It introduced backwards-incompatible functionality.
|
|
|
|
|
|
(MODULES-3246) Fix concat with Hash arguments.
|
|
Add validate_email_address function
|
|
|
|
85d5ead Updated the concat function so that it wouldn't modify the
original array. A side-effect of this change is that it now always calls
`Array()` on the second argument. If thit is a Hash, this results in
`to_a` being called on the hash, which converts it to an array or
tuples. This is undesired.
Update the behaviour so that it doesn't (indirectly) call `to_a` on
anything, instead test for the type of the argument, wrapping it in an
array if it's not already an array.
|
|
jearls/MODULES-2370-update-validate-to-not-require-line-when-matching-for-absence
[MODULES-2370] file_line.rb: Fix `line` attribute validation
|
|
MODULES-3201 - Fixed typo 'absense' to 'absence'
|
|
This removes the failing test special casing for puppet 4.
|
|
This removes much of the assorted cruft that accumulated in the
unmanaged files and moves the remaining necessary parts to
spec_helper_local.
|
|
`file_line` type: During validation, do not require `line` attribute if:
* `ensure` is `absent`,
* `match` is not empty,
* and `match_for_absence` is `true`.
Also update `spec` tests to reflect this.
|