From 384e2c40b24d3acf87171d690ec87cea0109db5d Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 13 Jun 2018 17:59:38 -0700 Subject: [PATCH] add a failing test case for calling dht put with a bad key see #5113 License: MIT Signed-off-by: Steven Allen --- test/sharness/t0170-dht.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/sharness/t0170-dht.sh b/test/sharness/t0170-dht.sh index 3a90649ea..90c9ec477 100755 --- a/test/sharness/t0170-dht.sh +++ b/test/sharness/t0170-dht.sh @@ -41,7 +41,15 @@ test_expect_success 'get with good keys' ' 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 "/pk/foo" "bar" && ! ipfsi 0 dht put "/ipns/foo" "bar"