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

[constructor/worker] Error if random range < 0 #265

Merged
merged 6 commits into from
Dec 4, 2020

Conversation

patrick-ogrady
Copy link
Contributor

@patrick-ogrady patrick-ogrady commented Dec 4, 2020

This PR raises an error if the range provided to utils.RandomNumber is invalid. This protects against panic!

Changes

  • RandomNumber return error in utils
  • Add test to utils
  • Add test to constructor/worker

@coveralls
Copy link

coveralls commented Dec 4, 2020

Pull Request Test Coverage Report for Build 13118

  • 24 of 34 (70.59%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 78.382%

Changes Missing Coverage Covered Lines Changed/Added Lines %
utils/utils.go 9 10 90.0%
storage/modules/key_storage.go 0 4 0.0%
constructor/worker/worker.go 15 20 75.0%
Files with Coverage Reduction New Missed Lines %
storage/modules/key_storage.go 1 68.46%
Totals Coverage Status
Change from base Build 13049: -0.03%
Covered Lines: 7926
Relevant Lines: 10112

💛 - Coveralls

@patrick-ogrady patrick-ogrady merged commit e943e1c into master Dec 4, 2020
@patrick-ogrady patrick-ogrady deleted the patrick/check-zero-random-amount branch December 4, 2020 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants