提交 6f68eac5 作者: Łukasz Magiera

commands/block: Increase mhlen in sharness

License: MIT
Signed-off-by: 's avatarŁukasz Magiera <magik6k@gmail.com>
上级 8c176d26
...@@ -185,11 +185,11 @@ test_expect_success "block get output looks right" ' ...@@ -185,11 +185,11 @@ test_expect_success "block get output looks right" '
' '
test_expect_success "can set multihash type and length on block put" ' test_expect_success "can set multihash type and length on block put" '
HASH=$(echo "foooo" | ipfs block put --format=raw --mhtype=sha3 --mhlen=16) HASH=$(echo "foooo" | ipfs block put --format=raw --mhtype=sha3 --mhlen=20)
' '
test_expect_success "output looks good" ' test_expect_success "output looks good" '
test "z25ScPysKoxJBcPxczn9NvuHiZU5" = "$HASH" test "z83bYcqyBkbx5fuNAcvbdv4pr5RYQiEpK" = "$HASH"
' '
test_expect_success "can read block with different hash" ' test_expect_success "can read block with different hash" '
...@@ -210,15 +210,15 @@ test_expect_success "no panic in output" ' ...@@ -210,15 +210,15 @@ test_expect_success "no panic in output" '
' '
test_expect_success "can set multihash type and length on block put without format" ' test_expect_success "can set multihash type and length on block put without format" '
HASH=$(echo "foooo" | ipfs block put --mhtype=sha3 --mhlen=16) HASH=$(echo "foooo" | ipfs block put --mhtype=sha3 --mhlen=20)
' '
test_expect_success "output looks good" ' test_expect_success "output looks good" '
test "z2APJNN6rqZTWPpv7gYFHzh7ZEDX" = "$HASH" test "z8bwYCvQPhyDY7VUTsUdGdE8Evm1ktSPV" = "$HASH"
' '
test_expect_success "put with sha3 and cidv0 fails" ' test_expect_success "put with sha3 and cidv0 fails" '
echo "foooo" | test_must_fail ipfs block put --mhtype=sha3 --mhlen=16 --format=v0 echo "foooo" | test_must_fail ipfs block put --mhtype=sha3 --mhlen=20 --format=v0
' '
test_done test_done
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论