Skip to content

Rewrite seeded_rand() as a Puppet 4.x function #1344

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

Merged
merged 2 commits into from
May 4, 2023
Merged

Rewrite seeded_rand() as a Puppet 4.x function #1344

merged 2 commits into from
May 4, 2023

Conversation

smortex
Copy link
Collaborator

@smortex smortex commented Apr 28, 2023

The 3.x function rely on is_integer() which is deprecated. Rewrite it using the more modern puppet 4.x function to rely on data types for better parameters validation.

  • Rework the tests to check actual values;
  • Rewrite seeded_rand() as a Puppet 4.x function.

Rather that testing that when called twice the function return the same
or different values, test the actual returned value so that we are sure
the behavior does not change unexpectedly.
The 3.x function rely on is_integer() which is deprecated. Rewrite it
using the more modern puppet 4.x function to rely on data types for
better parameters validation.
@smortex smortex marked this pull request as ready for review April 28, 2023 00:52
@smortex smortex requested review from a team, alexjfisher, b4ldr, bastelfreak and ekohl as code owners April 28, 2023 00:52
@binford2k binford2k merged commit 0733eee into main May 4, 2023
@binford2k binford2k deleted the seeded_rand branch May 4, 2023 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants