File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -215,4 +215,36 @@ test_expect_success "GET compact blocks succeeds" '
215
215
216
216
test_kill_ipfs_daemon
217
217
218
+
219
+ GWPORT=32563
220
+
221
+ test_expect_success " set up iptb testbed" '
222
+ iptb init -n 2 -p 0 -f --bootstrap=none &&
223
+ iptb run 0 ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/$GWPORT
224
+ '
225
+
226
+ test_expect_success " set NoFetch to true in config of node 0" '
227
+ iptb run 0 ipfs config --bool=true Gateway.NoFetch true
228
+ '
229
+
230
+ test_expect_success " start ipfs nodes" '
231
+ iptb start &&
232
+ iptb connect 0 1
233
+ '
234
+
235
+ test_expect_success " try fetching not present key from node 0" '
236
+ echo "hi" | iptb run 1 ipfs add -Q > hi.hash &&
237
+ test_expect_code 22 curl -f "http://127.0.0.1:$GWPORT/ipfs/$(cat hi.hash)"
238
+ '
239
+
240
+ test_expect_success " try fetching present key from from node 0" '
241
+ echo "hi" | iptb run 0 ipfs add -Q > hi.hash &&
242
+ PORT1=$(ipfs config Addresses.Gateway | cut -d/ -f 5) &&
243
+ curl -f "http://127.0.0.1:$GWPORT/ipfs/$(cat hi.hash)"
244
+ '
245
+
246
+ test_expect_success " stop testbed" '
247
+ iptb stop
248
+ '
249
+
218
250
test_done
You can’t perform that action at this time.
0 commit comments