提交 f96f6af9 作者: Tom O'Donnell (te0d)

ipfs add: added test case to verify presence of size

Added test case which greps the `ipfs add` api call,
checking that it outputs the added item's size.

License: MIT
Signed-off-by: 's avatarTom O'Donnell <todonnell91@gmail.com>
上级 0a01ffb8
#!/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" '
echo "hi" | curl -s -F file=@- "http://localhost:$API_PORT/api/v0/add" | grep "\"Size\": *\"11\""
'
test_kill_ipfs_daemon
test_done
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论