From 20f0ab8a9bad3017da874e120af2f21e0fb0a6f3 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sat, 25 Jun 2022 12:43:52 -0700 Subject: [PATCH] e2e: Make password test not use --one-time --- test_e2e.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/test_e2e.sh b/test_e2e.sh index 8bafb5e..ffcff21 100755 --- a/test_e2e.sh +++ b/test_e2e.sh @@ -1039,13 +1039,29 @@ function e2e::password_correct_password() { --git="$ASKPASS_GIT" \ --username="my-username" \ --password="my-password" \ - --one-time \ + --period=100ms \ --repo="file://$REPO" \ --branch="$MAIN_BRANCH" \ --rev=HEAD \ --root="$ROOT" \ --link="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"