-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2032 from ipfs/fix/close-notify
fix close notify
- Loading branch information
Showing
5 changed files
with
77 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2015 Jeromy Johnson | ||
# MIT Licensed; see the LICENSE file in this repository. | ||
# | ||
|
||
test_description="test http requests made by cli" | ||
|
||
. lib/test-lib.sh | ||
|
||
test_init_ipfs | ||
test_launch_ipfs_daemon | ||
|
||
test_expect_success "can make http request against nc server" ' | ||
go-sleep 0.5s | nc -l 5005 > nc_out & | ||
ipfs cat /ipfs/Qmabcdef --api /ip4/127.0.0.1/tcp/5005 || true | ||
' | ||
|
||
test_expect_success "output does not contain multipart info" ' | ||
test_expect_code 1 grep multipart nc_out | ||
' | ||
|
||
test_expect_success "request looks good" ' | ||
grep "POST /api/v0/cat" nc_out | ||
' | ||
|
||
test_expect_success "api flag does not appear in request" ' | ||
test_expect_code 1 grep "api=/ip4" nc_out | ||
' | ||
|
||
test_kill_ipfs_daemon | ||
|
||
test_done |