e2e: move flags and better errors

This commit is contained in:
Tim Hockin 2019-11-17 19:36:29 -08:00
parent 2b11e078b0
commit 27b43e624b
1 changed files with 5 additions and 5 deletions

View File

@ -533,10 +533,10 @@ echo "$TESTCASE 1" > "$REPO"/file
git -C "$REPO" commit -qam "$TESTCASE 1" git -C "$REPO" commit -qam "$TESTCASE 1"
GIT_SYNC \ GIT_SYNC \
--git=$SLOW_GIT \ --git=$SLOW_GIT \
--timeout=1 \
--logtostderr \ --logtostderr \
--v=5 \ --v=5 \
--one-time \ --one-time \
--timeout=1 \
--repo="file://$REPO" \ --repo="file://$REPO" \
--root="$ROOT" \ --root="$ROOT" \
--dest="link" \ --dest="link" \
@ -546,10 +546,10 @@ assert_file_absent "$ROOT"/link/file
# run with slow_git but without timing out # run with slow_git but without timing out
GIT_SYNC \ GIT_SYNC \
--git=$SLOW_GIT \ --git=$SLOW_GIT \
--timeout=16 \
--logtostderr \ --logtostderr \
--v=5 \ --v=5 \
--wait=0.1 \ --wait=0.1 \
--timeout=16 \
--repo="file://$REPO" \ --repo="file://$REPO" \
--root="$ROOT" \ --root="$ROOT" \
--dest="link" \ --dest="link" \
@ -642,7 +642,7 @@ GIT_SYNC \
NCPID=$! NCPID=$!
sleep 3 sleep 3
if kill -0 $NCPID > /dev/null 2>&1; then if kill -0 $NCPID > /dev/null 2>&1; then
fail "webhook not called, server still running" fail "webhook 1 not called, server still running"
fi fi
# Move forward # Move forward
echo "$TESTCASE 2" > "$REPO"/file echo "$TESTCASE 2" > "$REPO"/file
@ -652,14 +652,14 @@ git -C "$REPO" commit -qam "$TESTCASE 2"
NCPID=$! NCPID=$!
sleep 3 sleep 3
if kill -0 $NCPID > /dev/null 2>&1; then if kill -0 $NCPID > /dev/null 2>&1; then
fail "2 webhook not called, server still running" fail "webhook 2 not called, server still running"
fi fi
# Now return 200, ensure that it gets called # Now return 200, ensure that it gets called
{ (echo -e "HTTP/1.1 200 OK\r\n" | nc -q1 -l $NCPORT > /dev/null) &} { (echo -e "HTTP/1.1 200 OK\r\n" | nc -q1 -l $NCPORT > /dev/null) &}
NCPID=$! NCPID=$!
sleep 3 sleep 3
if kill -0 $NCPID > /dev/null 2>&1; then if kill -0 $NCPID > /dev/null 2>&1; then
fail "3 webhook not called, server still running" fail "webhook 3 not called, server still running"
fi fi
# Wrap up # Wrap up
remove_sync_container remove_sync_container