Age | Commit message (Collapse) | Author |
|
Fix filenames of two function spec tests
|
|
|
|
Add validate_domain_name function
|
|
|
|
(MODULES-4908) adds support for sensitive data type to pw_hash
|
|
|
|
Also includes a small fix to integer_spec so tests pass.
|
|
|
|
|
|
|
|
The tests weren't being run. Total tests increase from 2742 to 2769.
Also fix 'when using a class extending String' test.
It had been failing with...
```
RuntimeError:
can't modify frozen AlsoString
```
|
|
|
|
(Modules 4377) Causes ensure_packages to accept concurrent declarations with ensure => 'present' and 'installed'
|
|
(maint) Stdlib::Compat::Integer accepts numbers with newlines apparently
|
|
|
|
|
|
|
|
defined_with_params() now returns false for defined types, causing
duplicate resources when using ensure_resources().
Introduced by 4f19c27 in PE-20308.
|
|
|
|
- `defined_with_params` calls `findresource(reference.to_s)`
- `findresource` is
https://github.com/puppetlabs/puppet/blob/4.8.1/lib/puppet/parser/compiler.rb#L407
and points to
https://github.com/puppetlabs/puppet/blob/4.8.1/lib/puppet/resource/catalog.rb#L352
- This calls `Puppet::Resource.new` with the type
https://github.com/puppetlabs/puppet/blob/4.8.1/lib/puppet/resource/catalog.rb#L366
- This ends up calling `resource_type` via
https://github.com/puppetlabs/puppet/blob/4.8.1/lib/puppet/resource.rb#L317-L319
and that ends up declaring the type via the autoloader api at
https://github.com/puppetlabs/puppet/blob/4.8.1/lib/puppet/resource.rb#L390
- But why does the autoloader API fail to find it in the current
environment?
- Okay, so when the autoloader is trying to find the type, it uses the
typeloader to look it up in the current environment
https://github.com/puppetlabs/puppet/blob/4.8.1/lib/puppet/metatype/manager.rb#L171
- this calls `get_file` and `mark_loaded`
https://github.com/puppetlabs/puppet/blob/4.8.1/lib/puppet/util/autoload.rb#L64-L67
Suggested workaround is to pass a literal type instead of a string to
`findresource` to fix in stdlib, and also to fix loading/requiring of
type in core puppet.
This seems to affect more recent versions of puppet, so fallback to
original behavior on pre-4.5
|
|
|
|
Add glob function
|
|
(MODULES-4528) Use versioncmp to check Puppet version for 4.10.x compat
|
|
|
|
`Puppet.version.to_f` on Puppet 4.10.0 will evaluate to `4.1`, causing
test and behavioural changes when conditionals check that the version is
equal or greater than versions such as `4.3`.
Version comparisons that are vulnerable to this have been changed to use
Puppet's versioncmp implementation, while most others only check for
for major version boundaries which is safe.
|
|
(FM-6063) - Unit tests for high effort functions
|
|
|
|
* Improves regex to catch some valid (but less
known) ipv6 strings, mostly those which are a mix
of ipv6 strings and embedded ipv4 numbers
* Regex inspired by the following:
* https://github.com/sindresorhus/ip-regex
* https://gist.github.com/cpetschnig/294476
* The original Dartware forum thread where
someone originally created this beast of a regex,
now lost except to archive.org
* Whilst we're here, we can add the more tricky
ipv6 strings to the existing functions to validate
* Luckily, the `ipaddr` native ruby library used
in the original functions already supports these
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(FM-6019) - i18N tests for Spike
|
|
Allow test module metadata.json to be read
|
|
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)
|
|
|
|
Handle array values in join_keys_to_values function
|