@cryptotaxi247 / kubo / commits / a5e5b5be6

p2p: test custom protocol

License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>

Łukasz Magiera committed Sep 5, 2018 at 22:19 UTC a5e5b5be66ccc348483f2789afc9adff7c1686a6
1 file changed +10
test/sharness/t0180-p2p.sh
+10
@@ -276,6 +276,14 @@ test_expect_success 'start p2p listener on custom proto' '
276 test_must_be_empty listener-stdouterr.log
277 '
278
279 +spawn_sending_server
280 +
281 +test_expect_success 'S->C Setup client side (custom proto)' '
282 + ipfsi 1 p2p forward --allow-custom-protocol /p2p-test /ip4/127.0.0.1/tcp/10102 /ipfs/${PEERID_0} 2>&1 > dialer-stdouterr.log
283 +'
284 +
285 +test_server_to_client
286 +
287 test_expect_success 'C->S Close local listener' '
288 ipfsi 0 p2p close -p /p2p-test
289 ipfsi 0 p2p ls > actual &&
@@ -286,5 +294,7 @@ test_expect_success 'stop iptb' '
294 iptb stop
295 '
296
297 +check_test_ports
298 +
299 test_done
300