@cryptotaxi247 / kubo / commits / 358d04c60

sharness/t0110-gateway: add simple 404 check for non existent file

License: MIT Signed-off-by: Henry <cryptix@riseup.net>

Henry committed Jun 21, 2015 at 03:28 UTC 358d04c606c70af11d2b26bde517f1709e35cc39
1 file changed +4
test/sharness/t0110-gateway.sh
+4
@@ -53,6 +53,10 @@ test_expect_success "GET IPFS directory file output looks good" '
53 test_cmp dir/test actual
54 '
55
56 +test_expect_success "GET IPFS non existent file returns code expected (404)" '
57 + test_curl_resp_http_code "http://127.0.0.1:$port/ipfs/$HASH2/pleaseDontAddMe" "HTTP/1.1 404 Not Found"
58 +'
59 +
60 test_expect_failure "GET IPNS path succeeds" '
61 ipfs name publish "$HASH" &&
62 NAME=$(ipfs config Identity.PeerID) &&