Skip to content

Commit 5676842

Browse files
committed
Address comments from PR
1 parent b2677cc commit 5676842

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

test_e2e.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -594,13 +594,11 @@ testcase "webhook"
594594
NCPORT=8888
595595
# First sync
596596
echo "$TESTCASE 1" > "$REPO"/file
597-
expected_depth="1"
598597
git -C "$REPO" commit -qam "$TESTCASE 1"
599598
GIT_SYNC \
600599
--logtostderr \
601600
--v=5 \
602601
--repo="$REPO" \
603-
--depth="$expected_depth" \
604602
--root="$ROOT" \
605603
--webhook-url="http://127.0.0.1:$NCPORT" \
606604
--dest="link" > "$DIR"/log."$TESTCASE" 2>&1 &
@@ -635,31 +633,30 @@ pass
635633

636634
# Test http handler
637635
testcase "http"
636+
BINDPORT=8888
638637
# First sync
639638
echo "$TESTCASE 1" > "$REPO"/file
640-
expected_depth="1"
641639
git -C "$REPO" commit -qam "$TESTCASE 1"
642640
GIT_SYNC \
643641
--logtostderr \
644642
--v=5 \
645643
--repo="$REPO" \
646-
--depth="$expected_depth" \
647644
--root="$ROOT" \
648-
--http-bind=":8888" \
645+
--http-bind=":$BINDPORT" \
649646
--http-metrics \
650647
--http-pprof \
651648
--dest="link" > "$DIR"/log."$TESTCASE" 2>&1 &
652649
sleep 2
653650
# 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
655652
fail "health endpoint failed"
656653
fi
657654
# 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
659656
fail "metrics endpoint failed"
660657
fi
661658
# 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
663660
fail "pprof endpoint failed"
664661
fi
665662
# Wrap up

0 commit comments

Comments
 (0)