mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-02 09:12:44 +08:00
add a failing test case for calling dht put with a bad key
see #5113 License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
@ -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"
|
||||||
|
Reference in New Issue
Block a user