Skip to content

feat: CAR order and dups parameters from IPIP-412#87

Merged
hacdias merged 16 commits intomainfrom
ipip-412
Jul 26, 2023
Merged

feat: CAR order and dups parameters from IPIP-412#87
hacdias merged 16 commits intomainfrom
ipip-412

Conversation

@hacdias
Copy link
Copy Markdown
Member

@hacdias hacdias commented Jun 23, 2023

This PR creates tests for IPIP-412. Note the following:

  • ⚠️ This PR is running against ipip-412 branch in Kubo. Disable this before merging.
  • Tests for duplicates use a fixture where a directory contains two files that are the same. If dups=n, then there are no duplicates. If dups=y, then the blocks of the file are sent twice, by the order they show up in the DAG. This is tested with order=dfs.
  • The test above also tests order=dfs.
  • I added a test for order=unk where I simply check if all the CIDs are present, but not exactly since the order can be unknown. This test also doesn't check for the order in the response content type because the gateway can answer with any order they want.

@hacdias hacdias requested review from aschmahmann and lidel June 23, 2023 09:58
@hacdias hacdias marked this pull request as ready for review June 23, 2023 09:58
@laurentsenta laurentsenta mentioned this pull request Jun 26, 2023
@lidel lidel mentioned this pull request Jul 5, 2023
@lidel lidel changed the title feat: order and dups parameters CAR tests feat: CAR order and dups parameters from IPIP-412 Jul 14, 2023
Copy link
Copy Markdown
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.

lgtm, thank you @hacdias for adding remaining tests

@laurentsenta mind taking a look if it is ok to merge & release?
We want Rhea/Saturn to be able to run these in their CI.

Co-authored-by: Laurent Senta <laurent@singulargarden.com>
Copy link
Copy Markdown
Contributor

@laurentsenta laurentsenta left a comment

Choose a reason for hiding this comment

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

lgtm, let's not hardcode CIDs in the code without leaving notes to future maintainers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants