-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix(tests): properly test negative indexing #190
Conversation
for the entity-bytes negative indexing test, fix the test so that it actually tests that the last block in the file is not read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Triage note for January: we may need to revisit this based on the result of discussion in ipfs/boxo#523 (comment)
tests/trustless_gateway_car_test.go
Outdated
@@ -634,7 +634,7 @@ func TestTrustlessCarEntityBytes(t *testing.T) { | |||
HasBlocks( | |||
flattenStrings(t, | |||
subdirWithMixedBlockFiles.MustGetCid("subdir", "multiblock.txt"), | |||
subdirWithMixedBlockFiles.MustGetDescendantsCids("subdir", "multiblock.txt")[:5])..., | |||
subdirWithMixedBlockFiles.MustGetDescendantsCids("subdir", "multiblock.txt")[:len(subdirWithMixedBlockFiles.MustGetDescendantsCids("subdir", "multiblock.txt"))-1])..., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrote some thoughts in #112 (comment), but that work is separate from fix here, not a blocker.
6a97c94
to
7ed58d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed minor bugs and tested end-to-end in ipfs/kubo#10320, where CI is green.
Merging, will release as 0.5.x later this week (incl. bubbling up to Kubo/Boxo).
Goals
Fix #189
Implementation
Insure
entity-bytes
negative index test properly verifies that the last block of the underlying file is not read.