Allow to change etcd IP in tests

master
Vitaliy Filippov 2021-12-08 23:00:07 +03:00
parent 3a83a32cb7
commit 39e7f98e54
1 changed files with 4 additions and 3 deletions

View File

@ -21,6 +21,7 @@ cd `dirname $0`/..
trap 'kill -9 $(jobs -p)' EXIT trap 'kill -9 $(jobs -p)' EXIT
ETCD=${ETCD:-etcd} ETCD=${ETCD:-etcd}
ETCD_IP=${ETCD_IP:-127.0.0.1}
ETCD_PORT=${ETCD_PORT:-12379} ETCD_PORT=${ETCD_PORT:-12379}
if [ "$KEEP_DATA" = "" ]; then if [ "$KEEP_DATA" = "" ]; then
@ -29,11 +30,11 @@ if [ "$KEEP_DATA" = "" ]; then
fi fi
$ETCD -name etcd_test --data-dir ./testdata/etcd \ $ETCD -name etcd_test --data-dir ./testdata/etcd \
--advertise-client-urls http://127.0.0.1:$ETCD_PORT --listen-client-urls http://127.0.0.1:$ETCD_PORT \ --advertise-client-urls http://$ETCD_IP:$ETCD_PORT --listen-client-urls http://$ETCD_IP:$ETCD_PORT \
--initial-advertise-peer-urls http://127.0.0.1:$((ETCD_PORT+1)) --listen-peer-urls http://127.0.0.1:$((ETCD_PORT+1)) \ --initial-advertise-peer-urls http://$ETCD_IP:$((ETCD_PORT+1)) --listen-peer-urls http://$ETCD_IP:$((ETCD_PORT+1)) \
--max-txn-ops=100000 --auto-compaction-retention=10 --auto-compaction-mode=revision &>./testdata/etcd.log & --max-txn-ops=100000 --auto-compaction-retention=10 --auto-compaction-mode=revision &>./testdata/etcd.log &
ETCD_PID=$! ETCD_PID=$!
ETCD_URL=127.0.0.1:$ETCD_PORT/v3 ETCD_URL=$ETCD_IP:$ETCD_PORT/v3
ETCDCTL="${ETCD}ctl --endpoints=http://$ETCD_URL" ETCDCTL="${ETCD}ctl --endpoints=http://$ETCD_URL"
echo leak:fio >> testdata/lsan-suppress.txt echo leak:fio >> testdata/lsan-suppress.txt