Merge pull request #531 from thockin/master

Make ssh e2e test not use --one-time
This commit is contained in:
Kubernetes Prow Robot 2022-06-24 04:34:57 -07:00 committed by GitHub
commit a4b3b3ff08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 3 deletions

View File

@ -1800,8 +1800,12 @@ function e2e::ssh() {
IP=$(docker_ip "$CTR")
git -C "$REPO" commit -qam "$FUNCNAME"
# First sync
echo "$FUNCNAME 1" > "$REPO"/file
git -C "$REPO" commit -qam "$FUNCNAME 1"
GIT_SYNC \
--one-time \
--period=100ms \
--repo="test@$IP:/src" \
--branch="$MAIN_BRANCH" \
--rev=HEAD \
@ -1809,10 +1813,26 @@ function e2e::ssh() {
--link="link" \
--ssh \
--ssh-known-hosts=false \
>> "$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"
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"
}
##############################################