Address comments from PR
This commit is contained in:
parent
b2677cc434
commit
5676842f8c
13
test_e2e.sh
13
test_e2e.sh
|
|
@ -594,13 +594,11 @@ testcase "webhook"
|
||||||
NCPORT=8888
|
NCPORT=8888
|
||||||
# First sync
|
# First sync
|
||||||
echo "$TESTCASE 1" > "$REPO"/file
|
echo "$TESTCASE 1" > "$REPO"/file
|
||||||
expected_depth="1"
|
|
||||||
git -C "$REPO" commit -qam "$TESTCASE 1"
|
git -C "$REPO" commit -qam "$TESTCASE 1"
|
||||||
GIT_SYNC \
|
GIT_SYNC \
|
||||||
--logtostderr \
|
--logtostderr \
|
||||||
--v=5 \
|
--v=5 \
|
||||||
--repo="$REPO" \
|
--repo="$REPO" \
|
||||||
--depth="$expected_depth" \
|
|
||||||
--root="$ROOT" \
|
--root="$ROOT" \
|
||||||
--webhook-url="http://127.0.0.1:$NCPORT" \
|
--webhook-url="http://127.0.0.1:$NCPORT" \
|
||||||
--dest="link" > "$DIR"/log."$TESTCASE" 2>&1 &
|
--dest="link" > "$DIR"/log."$TESTCASE" 2>&1 &
|
||||||
|
|
@ -635,31 +633,30 @@ pass
|
||||||
|
|
||||||
# Test http handler
|
# Test http handler
|
||||||
testcase "http"
|
testcase "http"
|
||||||
|
BINDPORT=8888
|
||||||
# First sync
|
# First sync
|
||||||
echo "$TESTCASE 1" > "$REPO"/file
|
echo "$TESTCASE 1" > "$REPO"/file
|
||||||
expected_depth="1"
|
|
||||||
git -C "$REPO" commit -qam "$TESTCASE 1"
|
git -C "$REPO" commit -qam "$TESTCASE 1"
|
||||||
GIT_SYNC \
|
GIT_SYNC \
|
||||||
--logtostderr \
|
--logtostderr \
|
||||||
--v=5 \
|
--v=5 \
|
||||||
--repo="$REPO" \
|
--repo="$REPO" \
|
||||||
--depth="$expected_depth" \
|
|
||||||
--root="$ROOT" \
|
--root="$ROOT" \
|
||||||
--http-bind=":8888" \
|
--http-bind=":$BINDPORT" \
|
||||||
--http-metrics \
|
--http-metrics \
|
||||||
--http-pprof \
|
--http-pprof \
|
||||||
--dest="link" > "$DIR"/log."$TESTCASE" 2>&1 &
|
--dest="link" > "$DIR"/log."$TESTCASE" 2>&1 &
|
||||||
sleep 2
|
sleep 2
|
||||||
# check that health endpoint is alive
|
# check that health endpoint is alive
|
||||||
if [[ $(curl --write-out %{http_code} --silent --output /dev/null http://localhost:8888) -ne 200 ]] ; then
|
if [[ $(curl --write-out %{http_code} --silent --output /dev/null http://localhost:$BINDPORT) -ne 200 ]] ; then
|
||||||
fail "health endpoint failed"
|
fail "health endpoint failed"
|
||||||
fi
|
fi
|
||||||
# check that the metrics endpoint exists
|
# check that the metrics endpoint exists
|
||||||
if [[ $(curl --write-out %{http_code} --silent --output /dev/null http://localhost:8888/metrics) -ne 200 ]] ; then
|
if [[ $(curl --write-out %{http_code} --silent --output /dev/null http://localhost:$BINDPORT/metrics) -ne 200 ]] ; then
|
||||||
fail "metrics endpoint failed"
|
fail "metrics endpoint failed"
|
||||||
fi
|
fi
|
||||||
# check that the pprof endpoint exists
|
# check that the pprof endpoint exists
|
||||||
if [[ $(curl --write-out %{http_code} --silent --output /dev/null http://localhost:8888/debug/pprof/) -ne 200 ]] ; then
|
if [[ $(curl --write-out %{http_code} --silent --output /dev/null http://localhost:$BINDPORT/debug/pprof/) -ne 200 ]] ; then
|
||||||
fail "pprof endpoint failed"
|
fail "pprof endpoint failed"
|
||||||
fi
|
fi
|
||||||
# Wrap up
|
# Wrap up
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue