summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2017-07-31Merge pull request #753 from frapex/masterTP Honey
Add validate_domain_name function
2017-07-27(maint) move/rewrite round() as ruby functionEric Putnam
2017-07-26Merge pull request #717 from ripclawffb/filelineoptionEric Putnam
Add new file_line option append_on_no_match
2017-07-20Merge pull request #791 from eputnam/MODULES-4908Hunter Haugen
(MODULES-4908) adds support for sensitive data type to pw_hash
2017-07-18Add a round function to complement ceiling and floorNick Walker
2017-07-18Add new file_line option append_on_no_matchasif.shaikh
2017-07-18(MODULES-4908) adds support for sensitive data type to pw_hashEric Putnam
Also includes a small fix to integer_spec so tests pass.
2017-07-14Merge pull request #794 from ↵TP Honey
tkishel/MODULES-5003-file_line_does_not_change_multiple_lines_when_one_matches (MODULES-5003) file_line does not change multiple lines when one matches
2017-07-14FM-6239 clean up for puppet 5.tests/deprecationtphoney
2017-07-13(MODULES-5003) file_line_does_not_change_multiple_lines_when_one_matchestkishel
The exists? method is called to determine the need to call the create and destroy methods. When the ensure, match, and multiple attributes are defined, the exists? method needs to return false unless all the lines that match the match attribute equal the line attribute. The first commit is minimal, and implements this change. The second commit normalizes the code, which I needed for comprehension.
2017-07-13(FM-6239) rewrite of test following std patternstphoney
2017-07-11(MODULES-5187) fix spec tests for puppet 5 changesEric Putnam
2017-07-08Add validate_domain_name functionFrank de Jong
2017-07-07Merge pull request #716 from EmersonPrado/MODULES-4377TP Honey
(Modules 4377) Causes ensure_packages to accept concurrent declarations with ensure => 'present' and 'installed'
2017-07-07Merge pull request #788 from tphoney/MODULES-5003Eric Putnam
(MODULES-5003) file_line fix all broken lines
2017-07-07Merge pull request #756 from hunner/newline_integersTP Honey
(maint) Stdlib::Compat::Integer accepts numbers with newlines apparently
2017-07-07(MODULES-5186) dont run this test on windowstphoney
2017-07-06(MODULES-5186) move test to correct locationtphoney
2017-07-03(MODULES-5003) file_line fix all broken linestphoney
2017-05-09add testsHunter Haugen
2017-05-09(PE-20308) Also fix defined type strings & referencesHunter Haugen
2017-05-09Test for defined_with_params() returning false for defined typesDominic Cleal
defined_with_params() now returns false for defined types, causing duplicate resources when using ensure_resources(). Introduced by 4f19c27 in PE-20308.
2017-04-26(PE-20308) Correct boundary for 4.5 vs 4.6Hunter Haugen
2017-04-25(PE-20308) Pass a literal type and not a string to findresourceHunter Haugen
- `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
2017-04-14(maint) Stdlib::Compat::Integer accepts numbers with newlines apparentlyHunter Haugen
2017-03-21Merge pull request #718 from sspreitzer/master_globWilson McCoubrey
Add glob function
2017-03-21Update alias spec error message expectation for PUP-7371Dominic Cleal
The fix for PUP-7371 adds the missing `Undef` into the error message being tested in type aliases specs, fixing the following failure against Puppet's master branch: test::string rejects other values [] should fail to compile and raise an error matching /parameter 'value' expects a String/ Failure/Error: it { is_expected.to compile.and_raise_error(/parameter 'value' expects a String/) } error during compilation: Evaluation Error: Error while evaluating a Resource Statement, Class[Test::String]: parameter 'value' expects a value of type Undef or String, got Array at line 2:1 on node example # ./spec/aliases/string_spec.rb:27:in `block (5 levels) in <top (required)>'
2017-03-16Merge pull request #737 from domcleal/versioncmpWilson McCoubrey
(MODULES-4528) Use versioncmp to check Puppet version for 4.10.x compat
2017-03-15Permit double slash in absolute/Unix path typesDominic Cleal
2017-03-14Merge pull request #736 from HelenCampbell/lengthfunctDavid Schmitt
Addition of new length function
2017-03-14Addition of new length functionHelen Campbell
2017-03-14(MODULES-4528) Use versioncmp to check Puppet version for 4.10.x compatDominic Cleal
`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.
2017-03-13(#FM-6068) allow file encoding to be specified (#726)Geoff Williams
* (#FM-6068) allow file encoding to be specified Add a new parameter `encoding` to allow non UTF-8 files to specify a file encoding. This prevents receiving the error message "invalid byte sequence in UTF-8" when special characters that are not UTF-8 encoded appear in the input stream, such as the copyright symbol. * (#FM-6068) allow file encoding to be specified Added docs and tests as requested
2017-03-08Merge pull request #734 from pmcmaw/FM-6086-unitTestsTP Honey
(FM-6086) - Unit tests for Resource Types
2017-03-08(FM-6086) - Unit tests for Resource TypesPaula McMaw
2017-03-07(FM-6085) - Unit tests for Data TypesPaula McMaw
2017-03-03Merge pull request #732 from pmcmaw/FM-6063-unitTestsHailee Kenney
(FM-6063) - Unit tests for high effort functions
2017-03-03(FM-6063) - Unit tests for high effort functionsPaula McMaw
2017-03-03(MODULES-4485) Improve ipv6 support for typePeter Souter
* 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
2017-02-28loosen the regex for tuple checkingtphoney
2017-02-28(FM-6058) - Unit tests for med effort functionsPaula McMaw
2017-02-23Merge pull request #725 from pmcmaw/FM-6054-unitTestsTP Honey
(FM-6054) - Unit tests for low effort functions
2017-02-23(FM-6054) - Unit tests for low effort functionsPaula McMaw
2017-02-22Merge pull request #723 from ↵TP Honey
tphoney/remove_unsupported_platforms_and_future_parser remove unsupported platforms and future parser
2017-02-21remove unsupported platforms and future parsertphoney
2017-02-21Adding unit test for i18n delete_value functionPaula McMaw
2017-02-21Adding unit test for i18n delete_at functionPaula McMaw
2017-02-21Adding unit test for i18n delete functionPaula McMaw
2017-02-21Adding unit test for i18n count functionPaula McMaw
2017-02-21Adding unit test for i18n concat functionPaula McMaw