Rename tests for better filtering
This commit is contained in:
parent
fa8815953a
commit
69702eec2f
61
test_e2e.sh
61
test_e2e.sh
|
|
@ -217,7 +217,7 @@ function e2e::head_once() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test non-zero exit
|
# Test non-zero exit
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::non_zero_exit() {
|
function e2e::error_non_zero_exit() {
|
||||||
echo "$FUNCNAME" > "$REPO"/file
|
echo "$FUNCNAME" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME"
|
git -C "$REPO" commit -qam "$FUNCNAME"
|
||||||
(
|
(
|
||||||
|
|
@ -242,7 +242,7 @@ function e2e::non_zero_exit() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test HEAD one-time with an absolute-path link
|
# Test HEAD one-time with an absolute-path link
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::absolute_dest() {
|
function e2e::sync_absolute_dest() {
|
||||||
echo "$FUNCNAME" > "$REPO"/file
|
echo "$FUNCNAME" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME"
|
git -C "$REPO" commit -qam "$FUNCNAME"
|
||||||
|
|
||||||
|
|
@ -263,7 +263,7 @@ function e2e::absolute_dest() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test HEAD one-time with a subdir-path link
|
# Test HEAD one-time with a subdir-path link
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::subdir_dest() {
|
function e2e::sync_subdir_dest() {
|
||||||
echo "$FUNCNAME" > "$REPO"/file
|
echo "$FUNCNAME" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME"
|
git -C "$REPO" commit -qam "$FUNCNAME"
|
||||||
|
|
||||||
|
|
@ -284,7 +284,7 @@ function e2e::subdir_dest() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test default syncing (master)
|
# Test default syncing (master)
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::default_sync_master() {
|
function e2e::sync_default_branch() {
|
||||||
# First sync
|
# First sync
|
||||||
echo "$FUNCNAME 1" > "$REPO"/file
|
echo "$FUNCNAME 1" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
||||||
|
|
@ -320,7 +320,7 @@ function e2e::default_sync_master() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test HEAD syncing
|
# Test HEAD syncing
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::head_sync() {
|
function e2e::sync_head() {
|
||||||
# First sync
|
# First sync
|
||||||
echo "$FUNCNAME 1" > "$REPO"/file
|
echo "$FUNCNAME 1" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
||||||
|
|
@ -422,7 +422,7 @@ function e2e::readlink() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test branch syncing
|
# Test branch syncing
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::branch_sync() {
|
function e2e::sync_named_branch() {
|
||||||
OTHER_BRANCH="other-branch"
|
OTHER_BRANCH="other-branch"
|
||||||
# First sync
|
# First sync
|
||||||
git -C "$REPO" checkout -q -b "$OTHER_BRANCH"
|
git -C "$REPO" checkout -q -b "$OTHER_BRANCH"
|
||||||
|
|
@ -465,7 +465,7 @@ function e2e::branch_sync() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test switching branch after depth=1 checkout
|
# Test switching branch after depth=1 checkout
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::branch_switch() {
|
function e2e::sync_branch_switch() {
|
||||||
echo "$FUNCNAME" > "$REPO"/file
|
echo "$FUNCNAME" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME"
|
git -C "$REPO" commit -qam "$FUNCNAME"
|
||||||
|
|
||||||
|
|
@ -503,7 +503,7 @@ function e2e::branch_switch() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test tag syncing
|
# Test tag syncing
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::tag_sync() {
|
function e2e::sync_tag() {
|
||||||
TAG="e2e-tag"
|
TAG="e2e-tag"
|
||||||
|
|
||||||
# First sync
|
# First sync
|
||||||
|
|
@ -553,7 +553,7 @@ function e2e::tag_sync() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test tag syncing with annotated tags
|
# Test tag syncing with annotated tags
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::tag_sync_annotated() {
|
function e2e::sync_annotated_tag() {
|
||||||
TAG="e2e-tag"
|
TAG="e2e-tag"
|
||||||
|
|
||||||
# First sync
|
# First sync
|
||||||
|
|
@ -603,7 +603,7 @@ function e2e::tag_sync_annotated() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test rev syncing
|
# Test rev syncing
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::rev_sync() {
|
function e2e::sync_sha() {
|
||||||
# First sync
|
# First sync
|
||||||
echo "$FUNCNAME 1" > "$REPO"/file
|
echo "$FUNCNAME 1" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
||||||
|
|
@ -641,7 +641,7 @@ function e2e::rev_sync() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test rev-sync one-time
|
# Test rev-sync one-time
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::rev_once() {
|
function e2e::sync_sha_once() {
|
||||||
echo "$FUNCNAME" > "$REPO"/file
|
echo "$FUNCNAME" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME"
|
git -C "$REPO" commit -qam "$FUNCNAME"
|
||||||
REV=$(git -C "$REPO" rev-list -n1 HEAD)
|
REV=$(git -C "$REPO" rev-list -n1 HEAD)
|
||||||
|
|
@ -662,7 +662,7 @@ function e2e::rev_once() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test syncing after a crash
|
# Test syncing after a crash
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::crash_cleanup_retry() {
|
function e2e::sync_crash_cleanup_retry() {
|
||||||
# First sync
|
# First sync
|
||||||
echo "$FUNCNAME 1" > "$REPO"/file
|
echo "$FUNCNAME 1" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
||||||
|
|
@ -697,7 +697,7 @@ function e2e::crash_cleanup_retry() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test changing repos with storage intact
|
# Test changing repos with storage intact
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::change_repos_after_sync() {
|
function e2e::sync_repo_switch() {
|
||||||
# Prepare first repo
|
# Prepare first repo
|
||||||
echo "$FUNCNAME 1" > "$REPO"/file
|
echo "$FUNCNAME 1" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
||||||
|
|
@ -732,9 +732,9 @@ function e2e::change_repos_after_sync() {
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
# Test sync loop timeout
|
# Test with slow git, short timeout
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::sync_loop_timeout() {
|
function e2e::error_slow_git_short_timeout() {
|
||||||
# First sync
|
# First sync
|
||||||
echo "$FUNCNAME 1" > "$REPO"/file
|
echo "$FUNCNAME 1" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
||||||
|
|
@ -750,6 +750,15 @@ function e2e::sync_loop_timeout() {
|
||||||
>> "$1" 2>&1 || true
|
>> "$1" 2>&1 || true
|
||||||
# check for failure
|
# check for failure
|
||||||
assert_file_absent "$ROOT"/link/file
|
assert_file_absent "$ROOT"/link/file
|
||||||
|
}
|
||||||
|
|
||||||
|
##############################################
|
||||||
|
# Test with slow git, long timeout
|
||||||
|
##############################################
|
||||||
|
function e2e::sync_slow_git_long_timeout() {
|
||||||
|
# First sync
|
||||||
|
echo "$FUNCNAME 1" > "$REPO"/file
|
||||||
|
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
||||||
|
|
||||||
# run with slow_git but without timing out
|
# run with slow_git but without timing out
|
||||||
GIT_SYNC \
|
GIT_SYNC \
|
||||||
|
|
@ -778,7 +787,7 @@ function e2e::sync_loop_timeout() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test depth syncing
|
# Test depth syncing
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::depth() {
|
function e2e::sync_depth_shallow() {
|
||||||
# First sync
|
# First sync
|
||||||
echo "$FUNCNAME 1" > "$REPO"/file
|
echo "$FUNCNAME 1" > "$REPO"/file
|
||||||
expected_depth="1"
|
expected_depth="1"
|
||||||
|
|
@ -828,7 +837,7 @@ function e2e::depth() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test fetch skipping commit
|
# Test fetch skipping commit
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::fetch_skip_depth_1() {
|
function e2e::sync_fetch_skip_depth_1() {
|
||||||
echo "$FUNCNAME" > "$REPO"/file
|
echo "$FUNCNAME" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME"
|
git -C "$REPO" commit -qam "$FUNCNAME"
|
||||||
|
|
||||||
|
|
@ -870,7 +879,7 @@ function e2e::fetch_skip_depth_1() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test password auth with the wrong password
|
# Test password auth with the wrong password
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::password_wrong_password() {
|
function e2e::auth_password_wrong_password() {
|
||||||
echo "$FUNCNAME 1" > "$REPO"/file
|
echo "$FUNCNAME 1" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
||||||
|
|
||||||
|
|
@ -893,7 +902,7 @@ function e2e::password_wrong_password() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test password auth with the correct password
|
# Test password auth with the correct password
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::password_correct_password() {
|
function e2e::auth_password_correct_password() {
|
||||||
echo "$FUNCNAME 1" > "$REPO"/file
|
echo "$FUNCNAME 1" > "$REPO"/file
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
git -C "$REPO" commit -qam "$FUNCNAME 1"
|
||||||
|
|
||||||
|
|
@ -917,7 +926,7 @@ function e2e::password_correct_password() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test askpass-url with bad password
|
# Test askpass-url with bad password
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::askpass_url_wrong_password() {
|
function e2e::auth_askpass_url_wrong_password() {
|
||||||
# run the askpass-url service with wrong password
|
# run the askpass-url service with wrong password
|
||||||
HITLOG="$WORK/hitlog"
|
HITLOG="$WORK/hitlog"
|
||||||
cat /dev/null > "$HITLOG"
|
cat /dev/null > "$HITLOG"
|
||||||
|
|
@ -949,7 +958,7 @@ function e2e::askpass_url_wrong_password() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test askpass-url
|
# Test askpass-url
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::askpass_url() {
|
function e2e::auth_askpass_url_correct_password() {
|
||||||
# run with askpass_url service with correct password
|
# run with askpass_url service with correct password
|
||||||
HITLOG="$WORK/hitlog"
|
HITLOG="$WORK/hitlog"
|
||||||
cat /dev/null > "$HITLOG"
|
cat /dev/null > "$HITLOG"
|
||||||
|
|
@ -1002,7 +1011,7 @@ function e2e::askpass_url() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test askpass-url where the URL is flaky
|
# Test askpass-url where the URL is flaky
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::askpass_url_flaky() {
|
function e2e::auth_askpass_url_flaky() {
|
||||||
# run with askpass_url service which alternates good/bad replies.
|
# run with askpass_url service which alternates good/bad replies.
|
||||||
HITLOG="$WORK/hitlog"
|
HITLOG="$WORK/hitlog"
|
||||||
cat /dev/null > "$HITLOG"
|
cat /dev/null > "$HITLOG"
|
||||||
|
|
@ -1388,7 +1397,7 @@ function e2e::webhook_fire_and_forget() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test http handler
|
# Test http handler
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::http() {
|
function e2e::expose_http() {
|
||||||
BINDPORT=8888
|
BINDPORT=8888
|
||||||
|
|
||||||
# First sync
|
# First sync
|
||||||
|
|
@ -1438,7 +1447,7 @@ function e2e::http() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test http handler after restart
|
# Test http handler after restart
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::http_after_restart() {
|
function e2e::expose_http_after_restart() {
|
||||||
BINDPORT=8888
|
BINDPORT=8888
|
||||||
|
|
||||||
echo "$FUNCNAME" > "$REPO"/file
|
echo "$FUNCNAME" > "$REPO"/file
|
||||||
|
|
@ -1488,7 +1497,7 @@ function e2e::http_after_restart() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test submodule sync
|
# Test submodule sync
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::submodule_sync() {
|
function e2e::submodule_sync_default() {
|
||||||
# Init submodule repo
|
# Init submodule repo
|
||||||
SUBMODULE_REPO_NAME="sub"
|
SUBMODULE_REPO_NAME="sub"
|
||||||
SUBMODULE="$WORK/$SUBMODULE_REPO_NAME"
|
SUBMODULE="$WORK/$SUBMODULE_REPO_NAME"
|
||||||
|
|
@ -1744,7 +1753,7 @@ function e2e::submodule_sync_shallow() {
|
||||||
##############################################
|
##############################################
|
||||||
# Test SSH
|
# Test SSH
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::ssh() {
|
function e2e::auth_ssh() {
|
||||||
echo "$FUNCNAME" > "$REPO"/file
|
echo "$FUNCNAME" > "$REPO"/file
|
||||||
|
|
||||||
# Run a git-over-SSH server
|
# Run a git-over-SSH server
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue