forked from puppetlabs/puppetlabs-stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run test Puppet5.5 #1
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add new type to validate emails. The regex has been taken from the [html5 spec][1] [1]: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
Prior to this commit, the `spec/functions/shell_join_spec.rb` tests were failing on Ruby 2.7 as the `Shellwords.shelljoin` method in 2.7 does not escape the `+` character. Rather than have specific datasets for Ruby versions `< 2.7` and `>= 2.7`, it seemed easiest to simply remove this character from the tests.
In the context of Puppet 7 there are two subsequent calls to File.read from the catalog generated from the tests of `loadjson_spec.rb` and `load_module_metadata_spec.rb` Prior to this commit, these calls were causing exceptions from RSpec as the mock expectations for File.read were being thrown off. This did not manifest on Puppet 5 or 6. After this commit, any calls to File.read that do not conform to the expected arguments we want to mock a response for, are passed through to File.read.
…ix_up_r27_spec_failures (IAC-1228) Fix multiple spec test issues in Ruby 2.7
Prior to this commit, on Ruby 2.7, the range() method would NOT throw an ArgumentError exception if it was passed an invalid value as the step size (3rd arg). Instead, it would return an array of size 1,000,000 with repeated integer values of the 2nd arg. The function invokes Ruby's in built range method and `step` to define a step size to increment / decrement by and then passes the output to `first`, limiting to the first 1,000,000 values. On Ruby < 2.7, `step` would throw an `ArgumentError` if the step size passed was `0`: ``` 1..2).step(0).first(1_000_000).to_a Traceback (most recent call last): 5: from ~/.rvm/rubies/ruby-2.5.8/bin/irb:11:in `<main>' 4: from (irb):7 3: from (irb):7:in `first' 2: from (irb):7:in `each' 1: from (irb):7:in `step' ArgumentError (step can't be 0) ``` However, on Ruby 2.7, the `step` method returns an Enumerator that will then subsequently generate an Array of the size specified when passed to `first`, made up of the 2nd arg value (last): ``` (1..2).step(0).first(10).to_a => [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] ``` This is an issue, as the 3rd arg is passed to `to_i`, which then becomes the step size. For any values that cannot be converted to a positive / negative (or legit 0) Integer, a 0 is returned. This commit will perform a check on the value of `step` and throw an ArgumentError if it is not zero.
…ix_range_invalid_step_arg (IAC-1414) Throw error in range() function when step size invalid
Stdlib::Email type
(bugfix) Setting stricter email validation
…_pdk_template_rubocop Update to puppet-module-gems 1.0, pdk-templates and new rubocop
…/deprecate_rhel_5_family pdksync - (MAINT) Remove RHEL 5 family support
…/deprecate_sles11 pdksync - (MAINT) Remove SLES 11 support
…/perform_pdk_update pdksync - (MAINT) PDK update for GHA workflows + Litmus updates
…pet5 pdksync - Remove Puppet 5 from testing and bump minimal version to 6.0.0
….0.0 Release prep v7.0.0
Release Merge Back PR v7.0.0
Use fork of github_changelog_generator that allows generator to continue on errors
Fix typo in validate_ipv6_address function
pdksync - PDK Update - Replace Travis and Appveyor with Github Actions
…pupdate pdksync - PDK Update for auto release prep workflow
…move (maint) - Removal of Locales Folder
Release prep v7.0.1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
run test