commit - 9aeaf23a7e94501bdcb20d18427620cf70b87995
commit + 87724ba023ff5063a868e68ac90b991ae1cf7ec8
blob - 113aa4cf7bd50234a0d5ea376652934c0ef7b007
blob + 2da807fe1e4177665e880f05b69701f7a6bd8cbd
--- regress/gotd/request_bad.sh
+++ regress/gotd/request_bad.sh
fi
test_done "$testroot" "$ret"
}
+
+test_request_bad_no_repo() {
+ local testroot=`test_init test_request_bad_no_repo`
+ for i in `seq 10`; do
+ ssh ${GOTD_DEVUSER}@127.0.0.1 git-upload-pack \
+ >/dev/null 2>/dev/null </dev/null
+ done
+
+ # should still be able to clone; the repo is empty however
+ got clone -q ${GOTD_TEST_REPO_URL} $testroot/repo-clone \
+ 2> $testroot/stderr
+ cat <<EOF > $testroot/stderr.expected
+got-fetch-pack: could not find any branches to fetch
+got: could not find any branches to fetch
+EOF
+
+ if ! cmp -s "$testroot/stderr.expected" "$testroot/stderr"; then
+ echo "got clone failed for unexpected reason" >&2
+ diff -u "$testroot/stderr.expected" "$testroot/stderr"
+ test_done "$testroot" 1
+ return
+ fi
+
+ test_done "$testroot" 0
+}
+
test_parseargs "$@"
run_test test_request_bad_commit
run_test test_request_bad_length_zero
run_test test_request_bad_capabilities
run_test test_request_bad_repository
run_test test_request_bad_large_repo_name
+run_test test_request_bad_no_repo