-
-
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
Fix "ipfs ls" so it works correctly with raw leaves. #3557
Conversation
License: MIT Signed-off-by: Kevin Atkinson <[email protected]>
Note, the first commit "Add test for adding directory with --raw-leaves option." is not strictly required, but still I good idea to get more coverage when the "--raw-leaves" option is used (I wrote it thinking |
422eab9
to
04b3b02
Compare
Note: There doesn't seam to be any tests for the I will do that some time Tuesday. |
License: MIT Signed-off-by: Kevin Atkinson <[email protected]>
04b3b02
to
91da308
Compare
Okay this should be ready for review now. |
The 3526c26 is before the fix, does it cause the tests to fail? If it does it should be moved to after the fix. This way git-bisect will still work. |
# should not exist on the network, but we don't want to wait for a | ||
# timeout so we will kill the request after a few seconds | ||
test_expect_success "'ipfs ls --resolve-type=false' ok and does not hang" ' | ||
ipfs ls --resolve-type=false $DIR > /dev/null & |
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.
You can use go-timeout
here.
PID=$! | ||
sleep 2 | ||
kill $PID 2> /dev/null | ||
wait $PID |
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.
Wait after kill is not guaranteed to return valid return code, safer to use go-timeout
.
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.
Will do.
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.
No. It was an extra test that turned out to be unnecessary, but I decided to use it anyway. |
License: MIT Signed-off-by: Kevin Atkinson <[email protected]>
91da308
to
980e341
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.
LGTM
Closes #3548