add comments; use --one-time for testing
This commit is contained in:
parent
ac70751767
commit
d58a241648
|
|
@ -14,6 +14,8 @@ if [ "$1" != "clone" ]; then
|
|||
exit $?
|
||||
fi
|
||||
|
||||
# `git credential fill` requires the repo url match to consume the credentials stored by git-sync.
|
||||
# Askpass git only support repo started with "file://" which is used in test_e2e.sh.
|
||||
REPO=$(echo "$@" | grep -o "file://[^ ]*")
|
||||
PASSWD=$(echo "url=${REPO}" | git credential fill | grep -o "password=.*")
|
||||
# Test case much match the magic password below.
|
||||
|
|
|
|||
10
test_e2e.sh
10
test_e2e.sh
|
|
@ -637,14 +637,13 @@ GIT_SYNC \
|
|||
--password="I have no idea what the password is." \
|
||||
--logtostderr \
|
||||
--v=5 \
|
||||
--wait=0.1 \
|
||||
--one-time \
|
||||
--repo="file://$REPO" \
|
||||
--branch=master \
|
||||
--rev=HEAD \
|
||||
--root="$ROOT" \
|
||||
--dest="link" \
|
||||
> "$DIR"/log."$TESTCASE" 2>&1 &
|
||||
sleep 3
|
||||
> "$DIR"/log."$TESTCASE" 2>&1
|
||||
# check for failure
|
||||
assert_file_absent "$ROOT"/link/file
|
||||
# run with askpass_git with correct password
|
||||
|
|
@ -654,14 +653,13 @@ GIT_SYNC \
|
|||
--password="Lov3!k0os" \
|
||||
--logtostderr \
|
||||
--v=5 \
|
||||
--wait=0.1 \
|
||||
--one-time \
|
||||
--repo="file://$REPO" \
|
||||
--branch=master \
|
||||
--rev=HEAD \
|
||||
--root="$ROOT" \
|
||||
--dest="link" \
|
||||
> "$DIR"/log."$TESTCASE" 2>&1 &
|
||||
sleep 3
|
||||
> "$DIR"/log."$TESTCASE" 2>&1
|
||||
assert_link_exists "$ROOT"/link
|
||||
assert_file_exists "$ROOT"/link/file
|
||||
assert_file_eq "$ROOT"/link/file "$TESTCASE 1"
|
||||
|
|
|
|||
Loading…
Reference in New Issue