提交 ad67f18d 作者: Christian Couder

t0130: small improvements

License: MIT
Signed-off-by: 's avatarChristian Couder <chriscool@tuxfamily.org>
上级 cb6c7435
...@@ -16,18 +16,19 @@ test_expect_success "set up a few nodes" ' ...@@ -16,18 +16,19 @@ test_expect_success "set up a few nodes" '
' '
test_expect_success "add a file on node1" ' test_expect_success "add a file on node1" '
export IPFS_PATH="$IPTB_ROOT/1" export IPFS_PATH="$IPTB_ROOT/1" &&
random 1000000 > filea && random 1000000 > filea &&
FILEA_HASH=`ipfs add -q filea` FILEA_HASH=$(ipfs add -q filea)
' '
test_expect_success "cat that file on node2" ' test_expect_success "cat that file on node2" '
export IPFS_PATH="$IPTB_ROOT/2" export IPFS_PATH="$IPTB_ROOT/2" &&
ipfs cat $FILEA_HASH | multihash > actual1 ipfs cat $FILEA_HASH >fileb
' '
test_expect_success "verify files match" ' test_expect_success "verify files match" '
multihash filea > expected1 && multihash filea > expected1 &&
multihash fileb > actual1 &&
test_cmp actual1 expected1 test_cmp actual1 expected1
' '
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论