@cryptotaxi247 / kubo / commits / 384e2c40b

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>

Steven Allen committed Jun 13, 2018 at 17:59 UTC 384e2c40b24d3acf87171d690ec87cea0109db5d
1 file changed +9 -1
test/sharness/t0170-dht.sh
+9 -1
@@ -41,7 +41,15 @@ test_expect_success 'get with good keys' '
41 ipfsi 1 dht get "/ipns/$PEERID_2" | grep -aq "/ipfs/$HASH"
42 '
43
44 -test_expect_failure 'put with bad keys (issue #4611)' '
44 +test_expect_failure 'put with bad keys fails (issue #5113)' '
45 + ipfsi 0 dht put "foo" "bar" >putted
46 + ipfsi 0 dht put "/pk/foo" "bar" >>putted
47 + ipfsi 0 dht put "/ipns/foo" "bar" >>putted
48 + [ ! -s putted ] ||
49 + test_fsh cat putted
50 +'
51 +
52 +test_expect_failure 'put with bad keys returns error (issue #4611)' '
53 ! ipfsi 0 dht put "foo" "bar" &&
54 ! ipfsi 0 dht put "/pk/foo" "bar" &&
55 ! ipfsi 0 dht put "/ipns/foo" "bar"