mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 19:24:14 +08:00
commands/block: Increase mhlen in sharness
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
@ -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" '
|
|||||||
'
|
'
|
||||||
|
|
||||||
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
|
||||||
|
Reference in New Issue
Block a user