-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
gateway: fix --writable flag :| #3206
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,22 @@ test_description="Test HTTP Gateway (Writable)" | |
. lib/test-lib.sh | ||
|
||
test_init_ipfs | ||
|
||
test_launch_ipfs_daemon --writable | ||
test_expect_success "ipfs daemon --writable overrides config" ' | ||
curl -v -X POST http://$GWAY_ADDR/ipfs/ 2> outfile && | ||
grep "HTTP/1.1 201 Created" outfile && | ||
grep "Location: /ipfs/QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH" outfile | ||
' | ||
test_kill_ipfs_daemon | ||
|
||
test_config_ipfs_gateway_writable | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it happens right here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oooooh, i see. thanks! |
||
test_launch_ipfs_daemon --writable=false | ||
test_expect_success "ipfs daemon --writable=false overrides Writable=true config" ' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where do we set the config value to true? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, thanks! Moved the call to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm still not seeing it... Does it happen in one of the test libs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey I think you might have been viewing the outdated diff -- it happens right there: https://github.com/ipfs/go-ipfs/pull/3206/files#r78514885 (and I filed #3208 for the unrelated test failure) |
||
curl -v -X POST http://$GWAY_ADDR/ipfs/ 2> outfile && | ||
grep "HTTP/1.1 405 Method Not Allowed" outfile | ||
' | ||
test_kill_ipfs_daemon | ||
test_launch_ipfs_daemon | ||
|
||
port=$GWAY_PORT | ||
|
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.
These 4 lines are the essence of the bug.