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

test: use ipfs/go-test to consolidate code to generate test data #638

Merged
merged 8 commits into from
Jul 30, 2024

Conversation

gammazero
Copy link
Contributor

The go-test packages provides functionality for common types of test data generation. Use go-test for generating test data instead of internal utility packages.

The random test data can be generated deterministically by setting an initial seed if doing so is necessary to recreate certain test data.

@gammazero gammazero requested a review from a team as a code owner July 13, 2024 11:14
Copy link

codecov bot commented Jul 14, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 59.88%. Comparing base (8e51658) to head (3623e76).

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #638      +/-   ##
==========================================
- Coverage   59.92%   59.88%   -0.04%     
==========================================
  Files         238      237       -1     
  Lines       30052    29958      -94     
==========================================
- Hits        18008    17940      -68     
+ Misses      10428    10403      -25     
+ Partials     1616     1615       -1     
Files Coverage Δ
ipld/unixfs/test/utils.go 48.43% <100.00%> (+0.61%) ⬆️
util/util.go 18.00% <0.00%> (-21.35%) ⬇️

... and 12 files with indirect coverage changes

util/util.go Outdated Show resolved Hide resolved
util/util.go Outdated Show resolved Hide resolved
util/util.go Outdated Show resolved Hide resolved
The go-test packages provides functionality for common types of test data generation. Use go-test for generating test data instead of internal utility packages. The random test data can be generated deterministically by setting an initial seed if doing so is necessary to recreate certain test data.
Return rand.Rand in place of util.randGen. The type util.randGen was only used to provide a Read method as an alternative to using the rand.Rand read method.
@lidel lidel changed the title Use ipfs/go-test to consolidate code to generate test data test: use ipfs/go-test to consolidate code to generate test data Jul 30, 2024
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! (I'll try to resolve conflict and if CI remains green, merge later)

@gammazero gammazero merged commit ccfb6ce into main Jul 30, 2024
15 checks passed
@gammazero gammazero deleted the chore/use-go-test branch July 30, 2024 16:07
wenyue pushed a commit to wenyue/boxo that referenced this pull request Oct 17, 2024
…s#638)

* Use ipfs/go-test to consolidate code to generate test data

The go-test packages provides functionality for common types of test data generation. Use go-test for generating test data instead of internal utility packages. The random test data can be generated deterministically by setting an initial seed if doing so is necessary to recreate certain test data.

Return `rand.Rand` in place of `util.randGen`. The type `util.randGen` was only used to provide a `Read` method as an alternative to using the `rand.Rand.Read` method.
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