@cryptotaxi247 / kubo / commits / 109a618ac

iptb sharness tests: randomize ports

Otherwise they clash with each other if running on the same machine

Juan Batiz-Benet committed May 31, 2015 at 14:58 UTC 109a618acaf2bf3468c36aad54e532444fa34b10
2 files changed +5 -2
test/sharness/t0101-iptb-name.sh
+3 -1
@@ -10,8 +10,10 @@ test_description="Test ipfs repo operations"
10
11 export IPTB_ROOT="`pwd`/.iptb"
12
13 +
14 test_expect_success "set up an iptb cluster" '
14 - iptb -n=4 -p=9000 init &&
15 + IPTB_PORT=$((RANDOM % 10000 + 22000)) &&
16 + iptb -n=4 "-p=$IPTB_PORT" init &&
17 iptb -wait start
18 '
19
test/sharness/t0130-multinode.sh
+2 -1
@@ -11,7 +11,8 @@ test_description="Test multiple ipfs nodes"
11 export IPTB_ROOT="`pwd`/.iptb"
12
13 test_expect_success "set up a few nodes" '
14 - iptb -n=3 -p=9200 init &&
14 + IPTB_PORT=$((RANDOM % 10000 + 22000)) &&
15 + iptb -n=3 "-p=$IPTB_PORT" init &&
16 iptb -wait start
17 '
18