-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
add rabin min error test #5449
add rabin min error test #5449
Conversation
@Stebalien after you update gx dep , i add tests about rabin min error.please help me review it ,Thx |
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.
Thanks! @kevina actually updated the chunker dep yesterday so nothing should be blocking this.
test/sharness/t0040-add-and-cat.sh
Outdated
ipfs add --chunker rabin-36-512-1024 mountdir/hello.txt >actual | ||
' | ||
|
||
test_expect_failure "ipfs add --chunker rabin-12-512-1024 failed" ' |
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.
FYI, test_expect_failure
is actually poorly named. It's for testing known bugs, not testing things that should fail. This should actually just be test_expect_code 1 add --chunker ...
test/sharness/t0040-add-and-cat.sh
Outdated
@@ -156,6 +156,15 @@ test_add_cat_file() { | |||
test_cmp expected actual | |||
' | |||
|
|||
test_expect_success "ipfs add --chunker rabin-36-512-1024 succeeds" ' | |||
ipfs add --chunker rabin-36-512-1024 mountdir/hello.txt >actual |
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.
Given that we're not actually checking these results, we should probably just run this command as ipfs add -Q
(quiet) and not redirect to actual
. We redirect to a file when comparing output with some expected output.
License: MIT Signed-off-by: Kejie Zhang <601172892@qq.com>
License: MIT Signed-off-by: Kejie Zhang <601172892@qq.com>
hey @Stebalien ,Thx a lot for your advice. I have update my test.but maybe something wrong with ci.Can u help me review it?Thx. |
Windows CI broke yesterday. I'm rerunning it now. |
test/sharness/t0040-add-and-cat.sh
Outdated
ipfs add -Q --chunker rabin-36-512-1024 mountdir/hello.txt | ||
' | ||
|
||
test_expect_code 127 "ipfs add --chunker rabin-12-512-1024 failed" ' |
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.
Ah, sorry, my comment was confusing. This needs to be:
test_expect_success "...." '
test_expect_code 127 ...
'
(or something like that).
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)
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
f689437
to
18781fb
Compare
@Stebalien Thx for helping me fix it. |
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Np. Small nits like that are often easier to just fix quickly instead of wasting your time going back and forth. |
Hey @Stebalien , if If you have time,can u give me some advice about issue #4442 and #5432 .And I want to contribute more in ipfs.or if you any issue that i can help you,please ping me.Thx a lot. |
feature #5425
License: MIT
Signed-off-by: Kejie Zhang 601172892@qq.com