ipfs / boxo

A set of reference libraries for building IPFS applications and implementations in Go.
https://github.com/ipfs/boxo#readme
Other
205 stars 89 forks source link

ipns: fix test by using global random reader #586

Closed hacdias closed 6 months ago

hacdias commented 7 months ago

I think this may fix the test that was intermittently failing on Windows. By using the global crypto/rand.Reader we avoid creating two different random generators seeded with the same time, and therefore likely generating the same key.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 59.83%. Comparing base (2559ec2) to head (68da08c).

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #586      +/-   ##
==========================================
- Coverage   59.94%   59.83%   -0.12%     
==========================================
  Files         232      232              
  Lines       28127    28127              
==========================================
- Hits        16861    16829      -32     
- Misses       9798     9821      +23     
- Partials     1468     1477       +9     

see 8 files with indirect coverage changes

hacdias commented 6 months ago

This is a relatively small change. I will merge in hopes this will indeed fix the issue. We shall see.