提交 384e2c40 作者: Steven Allen

add a failing test case for calling dht put with a bad key

see #5113

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 6112150d
...@@ -41,7 +41,15 @@ test_expect_success 'get with good keys' ' ...@@ -41,7 +41,15 @@ test_expect_success 'get with good keys' '
ipfsi 1 dht get "/ipns/$PEERID_2" | grep -aq "/ipfs/$HASH" ipfsi 1 dht get "/ipns/$PEERID_2" | grep -aq "/ipfs/$HASH"
' '
test_expect_failure 'put with bad keys (issue #4611)' ' test_expect_failure 'put with bad keys fails (issue #5113)' '
ipfsi 0 dht put "foo" "bar" >putted
ipfsi 0 dht put "/pk/foo" "bar" >>putted
ipfsi 0 dht put "/ipns/foo" "bar" >>putted
[ ! -s putted ] ||
test_fsh cat putted
'
test_expect_failure 'put with bad keys returns error (issue #4611)' '
! ipfsi 0 dht put "foo" "bar" && ! ipfsi 0 dht put "foo" "bar" &&
! ipfsi 0 dht put "/pk/foo" "bar" && ! ipfsi 0 dht put "/pk/foo" "bar" &&
! ipfsi 0 dht put "/ipns/foo" "bar" ! ipfsi 0 dht put "/ipns/foo" "bar"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论