Last active
July 25, 2017 22:38
-
-
Save te0d/fcdfc0d1578fc3bcb7d1fed36c2a260b to your computer and use it in GitHub Desktop.
ipfs API add response test case draft
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
#!/bin/sh | |
# | |
# Copyright (c) 2016 Tom O'Donnell | |
# MIT Licensed; see the LICENSE file in this repository. | |
# | |
test_description="Test API add command" | |
. lib/test-lib.sh | |
test_init_ipfs | |
# Verify that that API add command returns size | |
test_launch_ipfs_daemon | |
test_expect_success "API Add response includes size field" ' | |
curl -s -F file=@- "http://localhost:${API_PORT}/api/v0/add" <<< "hi" | grep \"Size\": | |
' | |
test_kill_ipfs_daemon | |
test_done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you do this, use
echo hi
instead of<<<
. It is bash only notation AFAIK.