Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4: e2e: Don't manually "docker kill" #538

Merged
merged 1 commit into from
Jul 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions test_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1066,12 +1066,12 @@ function e2e::askpass_url() {
--root="$ROOT" \
--link="link" \
>> "$1" 2>&1 || true
docker_kill "$CTR"

# check for failure
assert_file_absent "$ROOT"/link/file

# run with askpass_url service with correct password
docker_kill "$CTR"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the manual kill here? To force a kill before CTR gets rewritten?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct - CTR is a helped and I need to kill and restart it here

CTR=$(docker_run \
e2e/test/test-ncsvr \
80 'echo -e "HTTP/1.1 200 OK\r\n\r\nusername=my-username\npassword=my-password"')
Expand All @@ -1087,7 +1087,6 @@ function e2e::askpass_url() {
--root="$ROOT" \
--link="link" \
>> "$1" 2>&1
docker_kill "$CTR"
assert_link_exists "$ROOT"/link
assert_file_exists "$ROOT"/link/file
assert_file_eq "$ROOT"/link/file "$FUNCNAME 1"
Expand Down Expand Up @@ -1263,7 +1262,6 @@ function e2e::webhook_success() {
if [[ "$HITS" < 1 ]]; then
fail "webhook 2 called $HITS times"
fi
docker_kill "$CTR"
}

##############################################
Expand Down Expand Up @@ -1298,9 +1296,9 @@ function e2e::webhook_fail_retry() {
if [[ "$HITS" < 1 ]]; then
fail "webhook 1 called $HITS times"
fi
docker_kill "$CTR"

# Now return 200, ensure that it gets called
docker_kill "$CTR"
cat /dev/null > "$HITLOG"
CTR=$(docker_run \
--ip="$IP" \
Expand All @@ -1312,7 +1310,6 @@ function e2e::webhook_fail_retry() {
if [[ "$HITS" < 1 ]]; then
fail "webhook 2 called $HITS times"
fi
docker_kill "$CTR"
}

##############################################
Expand Down Expand Up @@ -1348,8 +1345,6 @@ function e2e::webhook_success_once() {
if [[ "$HITS" != 1 ]]; then
fail "webhook called $HITS times"
fi

docker_kill "$CTR"
}

##############################################
Expand Down Expand Up @@ -1385,7 +1380,6 @@ function e2e::webhook_fail_retry_once() {
if [[ "$HITS" != 1 ]]; then
fail "webhook called $HITS times"
fi
docker_kill "$CTR"
}

##############################################
Expand Down Expand Up @@ -1421,7 +1415,6 @@ function e2e::webhook_fire_and_forget() {
if [[ "$HITS" < 1 ]]; then
fail "webhook called $HITS times"
fi
docker_kill "$CTR"
}

##############################################
Expand Down