From bde21410c6521cf3199d0b5daf93b5017ccde3d3 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 17 Nov 2019 18:53:35 -0800 Subject: [PATCH 1/8] Clean up e2e formatting --- test_e2e.sh | 54 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/test_e2e.sh b/test_e2e.sh index a79f5c7..2df6e3b 100755 --- a/test_e2e.sh +++ b/test_e2e.sh @@ -133,7 +133,8 @@ GIT_SYNC \ --rev=HEAD \ --root="$ROOT" \ --dest="link" \ - --one-time > "$DIR"/log."$TESTCASE" 2>&1 + --one-time \ + > "$DIR"/log."$TESTCASE" 2>&1 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file assert_file_eq "$ROOT"/link/file "$TESTCASE" @@ -151,7 +152,8 @@ GIT_SYNC \ --wait=0.1 \ --repo="$REPO" \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -187,7 +189,8 @@ GIT_SYNC \ --branch=master \ --rev=HEAD \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -225,7 +228,8 @@ GIT_SYNC \ --repo="$REPO" \ --branch="$BRANCH" \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -266,7 +270,8 @@ GIT_SYNC \ --repo="$REPO" \ --rev="$TAG" \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -312,7 +317,8 @@ GIT_SYNC \ --repo="$REPO" \ --rev="$TAG" \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -361,7 +367,8 @@ GIT_SYNC \ --repo="$REPO" \ --rev="$TAG" \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -420,7 +427,8 @@ GIT_SYNC \ --repo="$REPO" \ --rev="$REV" \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -457,7 +465,8 @@ GIT_SYNC \ --rev="$REV" \ --root="$ROOT" \ --dest="link" \ - --one-time > "$DIR"/log."$TESTCASE" 2>&1 + --one-time \ + > "$DIR"/log."$TESTCASE" 2>&1 sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -476,7 +485,8 @@ GIT_SYNC \ --one-time \ --repo="$REPO" \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -490,7 +500,8 @@ GIT_SYNC \ --one-time \ --repo="$REPO" \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -511,7 +522,8 @@ GIT_SYNC \ --one-time \ --repo="$REPO" \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 3 # check for failure assert_file_absent "$ROOT"/link/file @@ -524,7 +536,8 @@ GIT_SYNC \ --wait=0.1 \ --repo="$REPO" \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 10 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -554,7 +567,8 @@ GIT_SYNC \ --repo="$REPO" \ --depth="$expected_depth" \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -601,7 +615,8 @@ GIT_SYNC \ --repo="$REPO" \ --root="$ROOT" \ --webhook-url="http://127.0.0.1:$NCPORT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & # check that basic call works { (echo -e "HTTP/1.1 200 OK\r\n" | nc -q1 -l $NCPORT > /dev/null) &} NCPID=$! @@ -645,7 +660,8 @@ GIT_SYNC \ --http-bind=":$BINDPORT" \ --http-metrics \ --http-pprof \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 2 # check that health endpoint is alive if [[ $(curl --write-out %{http_code} --silent --output /dev/null http://localhost:$BINDPORT) -ne 200 ]] ; then @@ -698,7 +714,8 @@ GIT_SYNC \ --branch=master \ --rev=HEAD \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -787,7 +804,8 @@ GIT_SYNC \ --repo="$REPO" \ --depth="$expected_depth" \ --root="$ROOT" \ - --dest="link" > "$DIR"/log."$TESTCASE" 2>&1 & + --dest="link" \ + > "$DIR"/log."$TESTCASE" 2>&1 & sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/$SUBMODULE_REPO_NAME/submodule From bc0980b906a19e90d83b7b3033e37aa9e35bab73 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 17 Nov 2019 19:09:57 -0800 Subject: [PATCH 2/8] make e2e easier to read --- test_e2e.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/test_e2e.sh b/test_e2e.sh index 2df6e3b..1e39fe1 100755 --- a/test_e2e.sh +++ b/test_e2e.sh @@ -119,7 +119,9 @@ touch "$REPO"/file git -C "$REPO" add file git -C "$REPO" commit -aqm "init file" +############################################## # Test HEAD one-time +############################################## testcase "head-once" # First sync echo "$TESTCASE" > "$REPO"/file @@ -141,7 +143,9 @@ assert_file_eq "$ROOT"/link/file "$TESTCASE" # Wrap up pass +############################################## # Test default syncing +############################################## testcase "default-sync" # First sync echo "$TESTCASE 1" > "$REPO"/file @@ -176,7 +180,9 @@ remove_sync_container wait pass +############################################## # Test HEAD syncing +############################################## testcase "head-sync" # First sync echo "$TESTCASE 1" > "$REPO"/file @@ -213,7 +219,9 @@ remove_sync_container wait pass +############################################## # Test branch syncing +############################################## testcase "branch-sync" BRANCH="$TESTCASE"--BRANCH # First sync @@ -256,7 +264,9 @@ remove_sync_container wait pass +############################################## # Test tag syncing +############################################## testcase "tag-sync" TAG="$TESTCASE"--TAG # First sync @@ -303,7 +313,9 @@ remove_sync_container wait pass +############################################## # Test tag syncing with annotated tags +############################################## testcase "tag-sync-annotated" TAG="$TESTCASE"--TAG # First sync @@ -350,7 +362,9 @@ remove_sync_container wait pass +############################################## # Test cross-branch tag syncing +############################################## testcase "cross-branch-tag-sync" BRANCH="$TESTCASE"--BRANCH TAG="$TESTCASE"--TAG @@ -414,7 +428,9 @@ remove_sync_container wait pass +############################################## # Test rev syncing +############################################## testcase "rev-sync" # First sync echo "$TESTCASE 1" > "$REPO"/file @@ -451,7 +467,9 @@ remove_sync_container wait pass +############################################## # Test rev-sync one-time +############################################## testcase "rev-once" # First sync echo "$TESTCASE" > "$REPO"/file @@ -474,7 +492,9 @@ assert_file_eq "$ROOT"/link/file "$TESTCASE" # Wrap up pass +############################################## # Test syncing after a crash +############################################## testcase "crash-cleanup-retry" # First sync echo "$TESTCASE 1" > "$REPO"/file @@ -509,7 +529,9 @@ assert_file_eq "$ROOT"/link/file "$TESTCASE 1" # Wrap up pass +############################################## # Test sync loop timeout +############################################## testcase "sync-loop-timeout" # First sync echo "$TESTCASE 1" > "$REPO"/file @@ -554,7 +576,9 @@ remove_sync_container wait pass +############################################## # Test depth syncing +############################################## testcase "depth" # First sync echo "$TESTCASE 1" > "$REPO"/file @@ -603,7 +627,9 @@ remove_sync_container wait pass +############################################## # Test webhook +############################################## testcase "webhook" NCPORT=8888 # First sync @@ -646,7 +672,9 @@ remove_sync_container wait pass +############################################## # Test http handler +############################################## testcase "http" BINDPORT=8888 # First sync @@ -680,7 +708,9 @@ remove_sync_container wait pass +############################################## # Test submodule sync +############################################## testcase "submodule-sync" # Init submodule repo @@ -779,7 +809,9 @@ remove_sync_container wait pass +############################################## # Test submodules depth syncing +############################################## testcase "submodule-sync-depth" # Init submodule repo From c94c8087decc289c519cbe454fad37fab93f4bfa Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 17 Nov 2019 19:18:23 -0800 Subject: [PATCH 3/8] e2e --one-time tests can be sync --- test_e2e.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test_e2e.sh b/test_e2e.sh index 1e39fe1..a93dab7 100755 --- a/test_e2e.sh +++ b/test_e2e.sh @@ -485,7 +485,6 @@ GIT_SYNC \ --dest="link" \ --one-time \ > "$DIR"/log."$TESTCASE" 2>&1 -sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file assert_file_eq "$ROOT"/link/file "$TESTCASE" @@ -506,8 +505,7 @@ GIT_SYNC \ --repo="$REPO" \ --root="$ROOT" \ --dest="link" \ - > "$DIR"/log."$TESTCASE" 2>&1 & -sleep 3 + > "$DIR"/log."$TESTCASE" 2>&1 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file assert_file_eq "$ROOT"/link/file "$TESTCASE 1" @@ -521,8 +519,7 @@ GIT_SYNC \ --repo="$REPO" \ --root="$ROOT" \ --dest="link" \ - > "$DIR"/log."$TESTCASE" 2>&1 & -sleep 3 + > "$DIR"/log."$TESTCASE" 2>&1 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file assert_file_eq "$ROOT"/link/file "$TESTCASE 1" @@ -545,8 +542,7 @@ GIT_SYNC \ --repo="$REPO" \ --root="$ROOT" \ --dest="link" \ - > "$DIR"/log."$TESTCASE" 2>&1 & -sleep 3 + > "$DIR"/log."$TESTCASE" 2>&1 # check for failure assert_file_absent "$ROOT"/link/file # run with slow_git but without timing out From 5e82e574acc8c707cb8ea21050add55c97d08a78 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 17 Nov 2019 19:25:11 -0800 Subject: [PATCH 4/8] e2e more random (I actually hit this) --- test_e2e.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_e2e.sh b/test_e2e.sh index a93dab7..388ba7b 100755 --- a/test_e2e.sh +++ b/test_e2e.sh @@ -61,7 +61,7 @@ make container REGISTRY=e2e VERSION=$(make -s version) DIR="" for i in $(seq 1 10); do - DIR="/tmp/git-sync-test.$RANDOM" + DIR="/tmp/git-sync-test.$RANDOM$RANDOM" mkdir "$DIR" && break done if [[ -z "$DIR" ]]; then @@ -80,7 +80,7 @@ function finish() { trap finish INT EXIT -CONTAINER_NAME=git-sync-$RANDOM +CONTAINER_NAME=git-sync-$RANDOM$RANDOM function GIT_SYNC() { #./bin/linux_amd64/git-sync "$@" docker run \ From 405bfefdc2ca11876b558d92acd9c09a3673043e Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 17 Nov 2019 19:27:41 -0800 Subject: [PATCH 5/8] e2e: don't pass one-time and wait --- test_e2e.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test_e2e.sh b/test_e2e.sh index 388ba7b..521fe02 100755 --- a/test_e2e.sh +++ b/test_e2e.sh @@ -129,13 +129,12 @@ git -C "$REPO" commit -qam "$TESTCASE" GIT_SYNC \ --logtostderr \ --v=5 \ - --wait=0.1 \ + --one-time \ --repo="$REPO" \ --branch=master \ --rev=HEAD \ --root="$ROOT" \ --dest="link" \ - --one-time \ > "$DIR"/log."$TESTCASE" 2>&1 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -478,12 +477,11 @@ REV=$(git -C "$REPO" rev-list -n1 HEAD) GIT_SYNC \ --logtostderr \ --v=5 \ - --wait=0.1 \ + --one-time \ --repo="$REPO" \ --rev="$REV" \ --root="$ROOT" \ --dest="link" \ - --one-time \ > "$DIR"/log."$TESTCASE" 2>&1 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file @@ -542,7 +540,7 @@ GIT_SYNC \ --repo="$REPO" \ --root="$ROOT" \ --dest="link" \ - > "$DIR"/log."$TESTCASE" 2>&1 + > "$DIR"/log."$TESTCASE" 2>&1 || true # check for failure assert_file_absent "$ROOT"/link/file # run with slow_git but without timing out From 5a73199cf7760ad7043f132ec7edcccb595c0a76 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 27 Oct 2019 17:53:15 -0700 Subject: [PATCH 6/8] all e2e should use file://repo --- test_e2e.sh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/test_e2e.sh b/test_e2e.sh index 521fe02..5ebad92 100755 --- a/test_e2e.sh +++ b/test_e2e.sh @@ -130,7 +130,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --one-time \ - --repo="$REPO" \ + --repo="file://$REPO" \ --branch=master \ --rev=HEAD \ --root="$ROOT" \ @@ -153,7 +153,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --wait=0.1 \ - --repo="$REPO" \ + --repo="file://$REPO" \ --root="$ROOT" \ --dest="link" \ > "$DIR"/log."$TESTCASE" 2>&1 & @@ -190,7 +190,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --wait=0.1 \ - --repo="$REPO" \ + --repo="file://$REPO" \ --branch=master \ --rev=HEAD \ --root="$ROOT" \ @@ -232,7 +232,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --wait=0.1 \ - --repo="$REPO" \ + --repo="file://$REPO" \ --branch="$BRANCH" \ --root="$ROOT" \ --dest="link" \ @@ -276,7 +276,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --wait=0.1 \ - --repo="$REPO" \ + --repo="file://$REPO" \ --rev="$TAG" \ --root="$ROOT" \ --dest="link" \ @@ -325,7 +325,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --wait=0.1 \ - --repo="$REPO" \ + --repo="file://$REPO" \ --rev="$TAG" \ --root="$ROOT" \ --dest="link" \ @@ -377,7 +377,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --wait=0.1 \ - --repo="$REPO" \ + --repo="file://$REPO" \ --rev="$TAG" \ --root="$ROOT" \ --dest="link" \ @@ -439,7 +439,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --wait=0.1 \ - --repo="$REPO" \ + --repo="file://$REPO" \ --rev="$REV" \ --root="$ROOT" \ --dest="link" \ @@ -478,7 +478,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --one-time \ - --repo="$REPO" \ + --repo="file://$REPO" \ --rev="$REV" \ --root="$ROOT" \ --dest="link" \ @@ -500,7 +500,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --one-time \ - --repo="$REPO" \ + --repo="file://$REPO" \ --root="$ROOT" \ --dest="link" \ > "$DIR"/log."$TESTCASE" 2>&1 @@ -514,7 +514,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --one-time \ - --repo="$REPO" \ + --repo="file://$REPO" \ --root="$ROOT" \ --dest="link" \ > "$DIR"/log."$TESTCASE" 2>&1 @@ -537,7 +537,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --one-time \ - --repo="$REPO" \ + --repo="file://$REPO" \ --root="$ROOT" \ --dest="link" \ > "$DIR"/log."$TESTCASE" 2>&1 || true @@ -550,7 +550,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --wait=0.1 \ - --repo="$REPO" \ + --repo="file://$REPO" \ --root="$ROOT" \ --dest="link" \ > "$DIR"/log."$TESTCASE" 2>&1 & @@ -582,7 +582,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --wait=0.1 \ - --repo="$REPO" \ + --repo="file://$REPO" \ --depth="$expected_depth" \ --root="$ROOT" \ --dest="link" \ @@ -632,7 +632,7 @@ git -C "$REPO" commit -qam "$TESTCASE 1" GIT_SYNC \ --logtostderr \ --v=5 \ - --repo="$REPO" \ + --repo="file://$REPO" \ --root="$ROOT" \ --webhook-url="http://127.0.0.1:$NCPORT" \ --dest="link" \ @@ -677,7 +677,7 @@ git -C "$REPO" commit -qam "$TESTCASE 1" GIT_SYNC \ --logtostderr \ --v=5 \ - --repo="$REPO" \ + --repo="file://$REPO" \ --root="$ROOT" \ --http-bind=":$BINDPORT" \ --http-metrics \ @@ -734,7 +734,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --wait=0.1 \ - --repo="$REPO" \ + --repo="file://$REPO" \ --branch=master \ --rev=HEAD \ --root="$ROOT" \ @@ -827,7 +827,7 @@ GIT_SYNC \ --logtostderr \ --v=5 \ --wait=0.1 \ - --repo="$REPO" \ + --repo="file://$REPO" \ --depth="$expected_depth" \ --root="$ROOT" \ --dest="link" \ From 2b11e078b05e9d559ba938fd2c2a6833a5ec827f Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 27 Oct 2019 17:56:07 -0700 Subject: [PATCH 7/8] Remove default-value flags in e2e --- test_e2e.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/test_e2e.sh b/test_e2e.sh index 5ebad92..a71593a 100755 --- a/test_e2e.sh +++ b/test_e2e.sh @@ -735,8 +735,6 @@ GIT_SYNC \ --v=5 \ --wait=0.1 \ --repo="file://$REPO" \ - --branch=master \ - --rev=HEAD \ --root="$ROOT" \ --dest="link" \ > "$DIR"/log."$TESTCASE" 2>&1 & From 27b43e624b4465933f7ac74942f1e23635c78aa7 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 17 Nov 2019 19:36:29 -0800 Subject: [PATCH 8/8] e2e: move flags and better errors --- test_e2e.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test_e2e.sh b/test_e2e.sh index a71593a..c680362 100755 --- a/test_e2e.sh +++ b/test_e2e.sh @@ -533,10 +533,10 @@ echo "$TESTCASE 1" > "$REPO"/file git -C "$REPO" commit -qam "$TESTCASE 1" GIT_SYNC \ --git=$SLOW_GIT \ - --timeout=1 \ --logtostderr \ --v=5 \ --one-time \ + --timeout=1 \ --repo="file://$REPO" \ --root="$ROOT" \ --dest="link" \ @@ -546,10 +546,10 @@ assert_file_absent "$ROOT"/link/file # run with slow_git but without timing out GIT_SYNC \ --git=$SLOW_GIT \ - --timeout=16 \ --logtostderr \ --v=5 \ --wait=0.1 \ + --timeout=16 \ --repo="file://$REPO" \ --root="$ROOT" \ --dest="link" \ @@ -642,7 +642,7 @@ GIT_SYNC \ NCPID=$! sleep 3 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 # Move forward echo "$TESTCASE 2" > "$REPO"/file @@ -652,14 +652,14 @@ git -C "$REPO" commit -qam "$TESTCASE 2" NCPID=$! sleep 3 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 # Now return 200, ensure that it gets called { (echo -e "HTTP/1.1 200 OK\r\n" | nc -q1 -l $NCPORT > /dev/null) &} NCPID=$! sleep 3 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 # Wrap up remove_sync_container