@@ -594,13 +594,11 @@ testcase "webhook"
594
594
NCPORT=8888
595
595
# First sync
596
596
echo " $TESTCASE 1" > " $REPO " /file
597
- expected_depth=" 1"
598
597
git -C " $REPO " commit -qam " $TESTCASE 1"
599
598
GIT_SYNC \
600
599
--logtostderr \
601
600
--v=5 \
602
601
--repo=" $REPO " \
603
- --depth=" $expected_depth " \
604
602
--root=" $ROOT " \
605
603
--webhook-url=" http://127.0.0.1:$NCPORT " \
606
604
--dest=" link" > " $DIR " /log." $TESTCASE " 2>&1 &
@@ -635,31 +633,30 @@ pass
635
633
636
634
# Test http handler
637
635
testcase " http"
636
+ BINDPORT=8888
638
637
# First sync
639
638
echo " $TESTCASE 1" > " $REPO " /file
640
- expected_depth=" 1"
641
639
git -C " $REPO " commit -qam " $TESTCASE 1"
642
640
GIT_SYNC \
643
641
--logtostderr \
644
642
--v=5 \
645
643
--repo=" $REPO " \
646
- --depth=" $expected_depth " \
647
644
--root=" $ROOT " \
648
- --http-bind=" :8888 " \
645
+ --http-bind=" :$BINDPORT " \
649
646
--http-metrics \
650
647
--http-pprof \
651
648
--dest=" link" > " $DIR " /log." $TESTCASE " 2>&1 &
652
649
sleep 2
653
650
# check that health endpoint is alive
654
- if [[ $( curl --write-out %{http_code} --silent --output /dev/null http://localhost:8888 ) -ne 200 ]] ; then
651
+ if [[ $( curl --write-out %{http_code} --silent --output /dev/null http://localhost:$BINDPORT ) -ne 200 ]] ; then
655
652
fail " health endpoint failed"
656
653
fi
657
654
# check that the metrics endpoint exists
658
- if [[ $( curl --write-out %{http_code} --silent --output /dev/null http://localhost:8888 /metrics) -ne 200 ]] ; then
655
+ if [[ $( curl --write-out %{http_code} --silent --output /dev/null http://localhost:$BINDPORT /metrics) -ne 200 ]] ; then
659
656
fail " metrics endpoint failed"
660
657
fi
661
658
# check that the pprof endpoint exists
662
- if [[ $( curl --write-out %{http_code} --silent --output /dev/null http://localhost:8888 /debug/pprof/) -ne 200 ]] ; then
659
+ if [[ $( curl --write-out %{http_code} --silent --output /dev/null http://localhost:$BINDPORT /debug/pprof/) -ne 200 ]] ; then
663
660
fail " pprof endpoint failed"
664
661
fi
665
662
# Wrap up
0 commit comments