Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

fix: update tests to support go-ipfs automatic sharding#382

Closed
aschmahmann wants to merge 2 commits intomasterfrom
fix/go-ipfs-automatic-sharding
Closed

fix: update tests to support go-ipfs automatic sharding#382
aschmahmann wants to merge 2 commits intomasterfrom
fix/go-ipfs-automatic-sharding

Conversation

@aschmahmann
Copy link
Copy Markdown
Contributor

No description provided.

@welcome

This comment has been minimized.

test/files.js Outdated
Comment on lines +12 to +15
const SHARD_THRESHOLD = 2000
// Use this to help push the shard threshold over the go-ipfs defaults
// without just adding lots of files
const shardFilePadding = "".padStart(100, '0')
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@achingbrain we could figure out adding a configurable sharding threshold in go-ipfs. However, this seemed like it wasn't super painful and wouldn't make tests take too much longer. WDYT?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Having a configurable sharding threshold makes things like the test added as part of ipfs/js-ipfs#3936 more feasible. One or two tests like this are not super painful, but twenty or thirty would be.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It also means you can do the whole test in code instead of having to deal with importing car files to get HAMTs that are *just so*. Doing it all in code means it's easy to run in environments without filesystems like browsers.

@aschmahmann aschmahmann force-pushed the fix/go-ipfs-automatic-sharding branch from 0b57851 to 69832a6 Compare October 13, 2021 21:58
Switch to version that includes
ipfs/js-ipfs#3936
@lidel lidel force-pushed the fix/go-ipfs-automatic-sharding branch from 742c0ba to f001775 Compare November 23, 2021 21:43
@lidel
Copy link
Copy Markdown
Member

lidel commented Nov 23, 2021

Continued with approach from #393 in #400

@lidel lidel closed this Nov 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants