@cryptotaxi247 / kubo / commits / 50a1113b9

sharness: make sure putting to IPNS fails

Steven Allen committed Jul 25, 2019 at 22:47 UTC 50a1113b929f0d813309c516bd9cc3f44ac5bbb9
1 file changed +8
test/sharness/t0111-gateway-writeable.sh
+8
@@ -118,6 +118,14 @@ test_expect_success "We can HTTP GET file just put over a directory" '
118 test_cmp infile3 outfile3
119 '
120
121 +test_expect_success "HTTP PUT to /ipns fails" '
122 + PEERID=`ipfs id --format="<id>"` &&
123 + URL="http://localhost:$port/ipns/$PEERID/test.txt" &&
124 + echo "PUT $URL" &&
125 + curl -svX PUT --data-binary @infile1 "$URL" 2>curl_putIpns.out &&
126 + grep "HTTP/1.1 400 Bad Request" curl_putIpns.out
127 +'
128 +
129
130 test_kill_ipfs_daemon
131