Skip to content
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

Make tests compatible with Elixir 1.16 and 1.17 #565

Open
wants to merge 75 commits into
base: master
Choose a base branch
from

Conversation

ypconstante
Copy link
Contributor

@ypconstante ypconstante commented Jun 16, 2024

This PR replaces usages of Elixir functions that return random data, allowing us to update the test to work on all supported Elixir versions:

  • Replace Enum.random with :rand.uniform on Faker.Random.Test.random_between
  • Replace Enum.random with random_between on Faker.Random.Test.random_bytes
  • Replace Enum.take_random and Enum.shuffle with Enum.sort_by(random_uniform)

After this changes the only tests breaking was on Faker.File because of the map ordering changes on OTP 26, also fixed it and updated CI to test on both OTP 26 and 27.

I've added:

  • USAGE.md docs if applicable
  • CHANGELOG.md

@igas igas force-pushed the tests-compatible-elixir-1.17 branch from 50cd093 to aa41dbc Compare September 11, 2024 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants