3 # Copyright (c) 2008 Clemens Buchacher <drizzd@aon.at>
6 test_description
='test http-push
8 This test runs various sanity checks on http-push.'
15 if git http-push
> /dev
/null
2>&1 ||
[ $?
-eq 128 ]
17 say
"skipping test, USE_CURL_MULTI is not defined"
24 if ! start_httpd
>&3 2>&4
26 say
"skipping test, web server setup failed"
31 test_expect_success
'setup remote repository' '
39 git commit -m initial &&
41 git clone --bare test_repo test_repo.git &&
43 git --bare update-server-info &&
44 mv hooks/post-update.sample hooks/post-update &&
46 mv test_repo.git "$HTTPD_DOCUMENT_ROOT_PATH"
49 test_expect_success
'clone remote repository' '
51 git clone $HTTPD_URL/test_repo.git test_repo_clone
54 test_expect_failure
'push to remote repository' '
55 cd "$ROOT_PATH"/test_repo_clone &&
59 git commit -m path2 &&
61 [ -f "$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git/refs/heads/master" ]
64 test_expect_failure
'create and delete remote branch' '
65 cd "$ROOT_PATH"/test_repo_clone &&
66 git checkout -b dev &&
71 git push origin dev &&
73 git push origin :dev &&
74 git branch -d -r origin/dev &&
76 test_must_fail git show-ref --verify refs/remotes/origin/dev