Age | Commit message (Collapse) | Author |
|
Puppet's boolean parameter type is only available in Puppet 3.3 and
higher, so change file_type's new "replace" parameter to a regular
parameter with true and false as possible values. This matches the
existing "multiple" parameter.
|
|
Add load_metadata_json function
|
|
This function loads the metadata.json into a puppet variable. This enables a number of neat things such as:
* Which version of the module am I using? 2.x? 3.x?
* Which author of the module am I using? puppetlabs? example42?
|
|
[#puppethack] Adding replace attribute to file_line
|
|
4.7.x
|
|
|
|
all rubies
|
|
|
|
This only duplicates what's already being tested in ensure_packages_spec.rb
but doesn't work on all our supported platforms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fix time() on 1.8.7
|
|
The time() function takes an argument of a timezone, and always returns
time in epoch format. The epoch format is the number of seconds that
have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap
seconds. This means that it is universally the same regardless of
timezones.
I don't know what the timezone argument is supposed to do, and it is not
documented. So lets just make 1.8.7 work like > 1.8.7
|
|
|
|
|
|
|
|
Previously, the random number generator was seeded with the array or
string to be rotated in addition to any values specifically provided for
seeding. This behavior is potentially insecure in that it allows an
attacker who can modify the source data to choose the post-shuffle
order.
|
|
This is copied and changed code from an older version of puppet's internal
test setup code. It does not work with puppet4.
|
|
Tests in the new style produces the following documentation output:
abs
should not eq nil
should run abs() and raise an Puppet::ParseError
should run abs(-34) and return 34
should run abs("-34") and return 34
should run abs(34) and return 34
should run abs("34") and return 34
|
|
Usage:
describe 'puppet3 behaviour', :unless => RSpec.configuration.puppet_future do
describe 'puppet4 behaviour', :if => RSpec.configuration.puppet_future do
|
|
environmentpath
|
|
|
|
(MODULES-2071) Patch file_line provider to use multiple with after
|
|
parameter multiple in function handle_create_with_after
Without this, file_line resource without the `match` parameter but with the `after` param will throw an error if there are multiple matches for the after expression. This patch creates the handling for the `multiple` parameter in handle_create_with_after. This allows you to add a line after the `after` expression if it appears at multiple points in a file.
Updated reference to `file_line` in the README to reflect that the multiple parameter can be set when using `after` and/or `match` as the matching regex.
|
|
Without this patch, Ruby 1.8's Hash#to_s behaviour causes [{1=>2}] to be
treated as "12" when validating values.
|
|
The rspec-puppet matchers don't allow to check the return types, but
this is a pretty rare thing to need to do anyway, so probably not worth
patching rspec-puppet
|
|
|
|
This only roots all Facter instances into memory, while something already
creates a new Facter instance each run.
|
|
|
|
|
|
Use the more common "yes", instead of "true" to detect FUTURE_PARSER.
|
|
|
|
|
|
Check if file exists before loading with loadyaml. If not, return nil
|
|
|
|
support it.
|
|
Fix acceptance tests for #405
|
|
This fixes the acceptance tests by:
- Ensuring the fqdn_rand_string spec is passed undef as the second
parameter so that the seed is not used as the charset
- Ensuring the pw_hash spec is passed the key specifying the type of
hash, rather than the value that will be used to generate the
password
- Expecting puppet to report nil instead of empty string for undef
passwords
- Removing the fqdn_rand_base64 test because there is no such function
|
|
Fix off-by-one error in validate_augeas_spec.rb that was causing rspec failure
Even without the gem installed always, this is helpful to avoid errors should augeas be enabled/installed due to something else.
|
|
File_line checks provided after param if no match is found
|
|
unsupported_platforms is not a valid identifier, and trying to use it
causes acceptance tests to error out before running any tests. The
correct identifier for the unsupported platforms constants is
UNSUPPORTED_PLATFORMS.
|
|
Changed append line to open in 'w' mode and have to rewrite lines in order to append new line
|
|
(MODULES-1715) Add FQDN-based random string generator
|
|
|