@cryptotaxi247 / kubo / commits / 8c260f519

Add sharness test for raw node fetch

License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

Jakub Sztandera committed Nov 21, 2016 at 18:15 UTC 8c260f519390001197d26356990fbc2b20fd6e34
1 file changed +10
test/sharness/t0110-gateway.sh
+10
@@ -145,6 +145,16 @@ for cmd in "add" "block/put" "bootstrap" "config" "dht" "diag" "dns" "get" "id"
145 done
146 '
147
148 +test_expect_success "create raw-leaves node" '
149 + echo "This is RAW!" > rfile &&
150 + echo "This is RAW!" | ipfs add --raw-leaves -q > rhash
151 +'
152 +
153 +test_expect_success "try fetching it from gateway" '
154 + curl http://127.0.0.1:$port/ipfs/$(cat rhash) > ffile &&
155 + test_cmp rfile ffile
156 +'
157 +
158 test_kill_ipfs_daemon
159
160 test_done