diff --git a/test_e2e.sh b/test_e2e.sh index 82ea186..9f8571f 100755 --- a/test_e2e.sh +++ b/test_e2e.sh @@ -902,13 +902,29 @@ function e2e::password_correct_password() { --git="$ASKPASS_GIT" \ --username="my-username" \ --password="my-password" \ - --one-time \ + --wait=0.1 \ --repo="file://$REPO" \ --branch="$MAIN_BRANCH" \ --rev=HEAD \ --root="$ROOT" \ --dest="link" \ - >> "$1" 2>&1 + >> "$1" 2>&1 & + sleep 3 + assert_link_exists "$ROOT"/link + assert_file_exists "$ROOT"/link/file + assert_file_eq "$ROOT"/link/file "$FUNCNAME 1" + + # Move HEAD forward + echo "$FUNCNAME 2" > "$REPO"/file + git -C "$REPO" commit -qam "$FUNCNAME 2" + sleep 3 + assert_link_exists "$ROOT"/link + assert_file_exists "$ROOT"/link/file + assert_file_eq "$ROOT"/link/file "$FUNCNAME 2" + + # Move HEAD backward + git -C "$REPO" reset -q --hard HEAD^ + sleep 3 assert_link_exists "$ROOT"/link assert_file_exists "$ROOT"/link/file assert_file_eq "$ROOT"/link/file "$FUNCNAME 1"