parent
27f2c905fc
commit
320a4a7e93
64
test_e2e.sh
64
test_e2e.sh
|
|
@ -952,7 +952,7 @@ function e2e::password() {
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
# Test askpass_url
|
# Test askpass-url
|
||||||
##############################################
|
##############################################
|
||||||
function e2e::askpass_url() {
|
function e2e::askpass_url() {
|
||||||
echo "$FUNCNAME 1" > "$REPO"/file
|
echo "$FUNCNAME 1" > "$REPO"/file
|
||||||
|
|
@ -1529,6 +1529,37 @@ function e2e::ssh() {
|
||||||
assert_file_eq "$ROOT"/link/file "$FUNCNAME"
|
assert_file_eq "$ROOT"/link/file "$FUNCNAME"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##############################################
|
||||||
|
# Test sparse-checkout files
|
||||||
|
##############################################
|
||||||
|
function e2e::sparse_checkout() {
|
||||||
|
echo "!/*" > "$DIR"/sparseconfig
|
||||||
|
echo "!/*/" >> "$DIR"/sparseconfig
|
||||||
|
echo "file2" >> "$DIR"/sparseconfig
|
||||||
|
echo "$FUNCNAME" > "$REPO"/file
|
||||||
|
echo "$FUNCNAME" > "$REPO"/file2
|
||||||
|
mkdir "$REPO"/dir
|
||||||
|
echo "$FUNCNAME" > "$REPO"/dir/file3
|
||||||
|
git -C "$REPO" add file2
|
||||||
|
git -C "$REPO" add dir
|
||||||
|
git -C "$REPO" commit -qam "$FUNCNAME"
|
||||||
|
GIT_SYNC \
|
||||||
|
--one-time \
|
||||||
|
--repo="file://$REPO" \
|
||||||
|
--branch="$MAIN_BRANCH" \
|
||||||
|
--rev=HEAD \
|
||||||
|
--root="$ROOT" \
|
||||||
|
--link="link" \
|
||||||
|
--sparse-checkout-file="$DIR/sparseconfig" \
|
||||||
|
>> "$1" 2>&1
|
||||||
|
assert_link_exists "$ROOT"/link
|
||||||
|
assert_file_exists "$ROOT"/link/file2
|
||||||
|
assert_file_absent "$ROOT"/link/file
|
||||||
|
assert_file_absent "$ROOT"/link/dir/file3
|
||||||
|
assert_file_absent "$ROOT"/link/dir
|
||||||
|
assert_file_eq "$ROOT"/link/file2 "$FUNCNAME"
|
||||||
|
}
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
# Test additional git configs
|
# Test additional git configs
|
||||||
##############################################
|
##############################################
|
||||||
|
|
@ -1588,37 +1619,6 @@ function e2e::export_error() {
|
||||||
assert_file_absent "$ROOT"/error.json
|
assert_file_absent "$ROOT"/error.json
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################
|
|
||||||
# Test sparse-checkout files
|
|
||||||
##############################################
|
|
||||||
function e2e::sparse_checkout() {
|
|
||||||
echo "!/*" > "$DIR"/sparseconfig
|
|
||||||
echo "!/*/" >> "$DIR"/sparseconfig
|
|
||||||
echo "file2" >> "$DIR"/sparseconfig
|
|
||||||
echo "$FUNCNAME" > "$REPO"/file
|
|
||||||
echo "$FUNCNAME" > "$REPO"/file2
|
|
||||||
mkdir "$REPO"/dir
|
|
||||||
echo "$FUNCNAME" > "$REPO"/dir/file3
|
|
||||||
git -C "$REPO" add file2
|
|
||||||
git -C "$REPO" add dir
|
|
||||||
git -C "$REPO" commit -qam "$FUNCNAME"
|
|
||||||
GIT_SYNC \
|
|
||||||
--one-time \
|
|
||||||
--repo="file://$REPO" \
|
|
||||||
--branch="$MAIN_BRANCH" \
|
|
||||||
--rev=HEAD \
|
|
||||||
--root="$ROOT" \
|
|
||||||
--link="link" \
|
|
||||||
--sparse-checkout-file="$DIR/sparseconfig" \
|
|
||||||
>> "$1" 2>&1
|
|
||||||
assert_link_exists "$ROOT"/link
|
|
||||||
assert_file_exists "$ROOT"/link/file2
|
|
||||||
assert_file_absent "$ROOT"/link/file
|
|
||||||
assert_file_absent "$ROOT"/link/dir/file3
|
|
||||||
assert_file_absent "$ROOT"/link/dir
|
|
||||||
assert_file_eq "$ROOT"/link/file2 "$FUNCNAME"
|
|
||||||
}
|
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
# Test github HTTPS
|
# Test github HTTPS
|
||||||
# TODO: it would be better if we set up a local HTTPS server
|
# TODO: it would be better if we set up a local HTTPS server
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue