Rename tests for better filtering

This commit is contained in:
Tim Hockin 2022-06-18 12:34:54 -07:00
parent 3719d0385e
commit 27ac1642c9
1 changed files with 41 additions and 32 deletions

View File

@ -197,7 +197,7 @@ function remove_containers() {
##############################################
# Test HEAD one-time when root doesn't exist
##############################################
function e2e::head_once_root_doesnt_exist() {
function e2e::sync_head_once_root_doesnt_exist() {
echo "$FUNCNAME" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME"
@ -217,7 +217,7 @@ function e2e::head_once_root_doesnt_exist() {
##############################################
# Test HEAD one-time when root exists and is empty
##############################################
function e2e::head_once_root_exists_empty() {
function e2e::sync_head_once_root_exists_empty() {
echo "$FUNCNAME" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME"
@ -237,7 +237,7 @@ function e2e::head_once_root_exists_empty() {
##############################################
# Test HEAD one-time with a weird --root flag
##############################################
function e2e::head_once_root_flag_is_weird() {
function e2e::sync_head_once_root_flag_is_weird() {
echo "$FUNCNAME" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME"
@ -257,7 +257,7 @@ function e2e::head_once_root_flag_is_weird() {
##############################################
# Test HEAD one-time with a symlink in --root
##############################################
function e2e::head_once_root_flag_has_symlink() {
function e2e::sync_head_once_root_flag_has_symlink() {
echo "$FUNCNAME" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME"
ln -s "$ROOT" "$ROOT/rootlink" # symlink to test
@ -278,7 +278,7 @@ function e2e::head_once_root_flag_has_symlink() {
##############################################
# Test non-zero exit
##############################################
function e2e::non_zero_exit() {
function e2e::error_non_zero_exit() {
echo "$FUNCNAME" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME"
@ -304,7 +304,7 @@ function e2e::non_zero_exit() {
##############################################
# Test HEAD one-time when root is under a git repo
##############################################
function e2e::head_once_root_exists_but_is_not_git_root() {
function e2e::sync_head_once_root_exists_but_is_not_git_root() {
echo "$FUNCNAME" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME"
@ -329,7 +329,7 @@ function e2e::head_once_root_exists_but_is_not_git_root() {
##############################################
# Test HEAD one-time when root fails sanity
##############################################
function e2e::head_once_root_exists_but_fails_sanity() {
function e2e::sync_head_once_root_exists_but_fails_sanity() {
echo "$FUNCNAME" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME"
SHA=$(git -C "$REPO" rev-parse HEAD)
@ -358,7 +358,7 @@ function e2e::head_once_root_exists_but_fails_sanity() {
##############################################
# Test HEAD one-time with an absolute-path link
##############################################
function e2e::absolute_link() {
function e2e::sync_absolute_link() {
echo "$FUNCNAME" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME"
@ -379,7 +379,7 @@ function e2e::absolute_link() {
##############################################
# Test HEAD one-time with a subdir-path link
##############################################
function e2e::subdir_link() {
function e2e::sync_subdir_link() {
echo "$FUNCNAME" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME"
@ -400,7 +400,7 @@ function e2e::subdir_link() {
##############################################
# Test default-branch syncing
##############################################
function e2e::default_branch_sync() {
function e2e::sync_default_branch() {
# First sync
echo "$FUNCNAME 1" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME 1"
@ -436,7 +436,7 @@ function e2e::default_branch_sync() {
##############################################
# Test HEAD syncing
##############################################
function e2e::head_sync() {
function e2e::sync_head() {
# First sync
echo "$FUNCNAME 1" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME 1"
@ -555,7 +555,7 @@ function e2e::readlink() {
##############################################
# Test branch syncing
##############################################
function e2e::branch_sync() {
function e2e::sync_named_branch() {
OTHER_BRANCH="other-branch"
# First sync
@ -599,7 +599,7 @@ function e2e::branch_sync() {
##############################################
# Test switching branch after depth=1 checkout
##############################################
function e2e::branch_switch() {
function e2e::sync_branch_switch() {
# First sync
echo "$FUNCNAME" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME"
@ -637,7 +637,7 @@ function e2e::branch_switch() {
##############################################
# Test tag syncing
##############################################
function e2e::tag_sync() {
function e2e::sync_tag() {
TAG="e2e-tag"
# First sync
@ -687,7 +687,7 @@ function e2e::tag_sync() {
##############################################
# Test tag syncing with annotated tags
##############################################
function e2e::tag_sync_annotated() {
function e2e::sync_annotated_tag() {
TAG="e2e-tag"
# First sync
@ -737,7 +737,7 @@ function e2e::tag_sync_annotated() {
##############################################
# Test rev syncing
##############################################
function e2e::rev_sync() {
function e2e::sync_sha() {
# First sync
echo "$FUNCNAME 1" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME 1"
@ -775,7 +775,7 @@ function e2e::rev_sync() {
##############################################
# Test rev-sync one-time
##############################################
function e2e::rev_once() {
function e2e::sync_sha_once() {
# First sync
echo "$FUNCNAME" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME"
@ -797,7 +797,7 @@ function e2e::rev_once() {
##############################################
# Test syncing after a crash
##############################################
function e2e::crash_cleanup_retry() {
function e2e::sync_crash_cleanup_retry() {
# First sync
echo "$FUNCNAME 1" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME 1"
@ -832,7 +832,7 @@ function e2e::crash_cleanup_retry() {
##############################################
# Test changing repos with storage intact
##############################################
function e2e::change_repos_after_sync() {
function e2e::sync_repo_switch() {
# Prepare first repo
echo "$FUNCNAME 1" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME 1"
@ -867,9 +867,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
echo "$FUNCNAME 1" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME 1"
@ -886,6 +886,15 @@ function e2e::sync_loop_timeout() {
# check for failure
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_clone but without timing out
GIT_SYNC \
@ -914,7 +923,7 @@ function e2e::sync_loop_timeout() {
##############################################
# Test depth syncing
##############################################
function e2e::depth() {
function e2e::sync_depth_shallow() {
# First sync
echo "$FUNCNAME 1" > "$REPO"/file
expected_depth="1"
@ -964,7 +973,7 @@ function e2e::depth() {
##############################################
# Test fetch skipping commit
##############################################
function e2e::fetch_skip_depth_1() {
function e2e::sync_fetch_skip_depth_1() {
echo "$FUNCNAME" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME"
@ -1006,7 +1015,7 @@ function e2e::fetch_skip_depth_1() {
##############################################
# Test password auth with the wrong password
##############################################
function e2e::password_wrong_password() {
function e2e::auth_password_wrong_password() {
echo "$FUNCNAME 1" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME 1"
@ -1030,7 +1039,7 @@ function e2e::password_wrong_password() {
##############################################
# Test password auth with the correct password
##############################################
function e2e::password_correct_password() {
function e2e::auth_password_correct_password() {
echo "$FUNCNAME 1" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME 1"
@ -1054,7 +1063,7 @@ function e2e::password_correct_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
HITLOG="$WORK/hitlog"
cat /dev/null > "$HITLOG"
@ -1087,7 +1096,7 @@ function e2e::askpass_url_wrong_password() {
##############################################
# Test askpass-url
##############################################
function e2e::askpass_url() {
function e2e::auth_askpass_url_correct_password() {
# run with askpass_url service with correct password
HITLOG="$WORK/hitlog"
cat /dev/null > "$HITLOG"
@ -1140,7 +1149,7 @@ function e2e::askpass_url() {
##############################################
# 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.
HITLOG="$WORK/hitlog"
cat /dev/null > "$HITLOG"
@ -1527,7 +1536,7 @@ function e2e::webhook_fire_and_forget() {
##############################################
# Test http handler
##############################################
function e2e::http() {
function e2e::expose_http() {
BINDPORT=8888
# First sync
@ -1582,7 +1591,7 @@ function e2e::http() {
##############################################
# Test http handler after restart
##############################################
function e2e::http_after_restart() {
function e2e::expose_http_after_restart() {
BINDPORT=8888
echo "$FUNCNAME" > "$REPO"/file
@ -1632,7 +1641,7 @@ function e2e::http_after_restart() {
##############################################
# Test submodule sync
##############################################
function e2e::submodule_sync() {
function e2e::submodule_sync_default() {
# Init submodule repo
SUBMODULE_REPO_NAME="sub"
SUBMODULE="$WORK/$SUBMODULE_REPO_NAME"
@ -1889,7 +1898,7 @@ function e2e::submodule_sync_shallow() {
##############################################
# Test SSH
##############################################
function e2e::ssh() {
function e2e::auth_ssh() {
echo "$FUNCNAME" > "$REPO"/file
# Run a git-over-SSH server