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.'
17 if ! start_httpd
>&3 2>&4
19 say
"skipping test, web server setup failed"
24 test_expect_success
'setup remote repository' '
32 git commit -m initial &&
34 git clone --bare test_repo test_repo.git &&
36 git --bare update-server-info &&
37 chmod +x hooks/post-update &&
39 mv test_repo.git $HTTPD_DOCUMENT_ROOT_PATH
42 test_expect_success
'clone remote repository' '
44 git clone $HTTPD_URL/test_repo.git test_repo_clone
47 test_expect_success
'push to remote repository' '
48 cd "$ROOT_PATH"/test_repo_clone &&
52 git commit -m path2 &&
56 test_expect_success
'create and delete remote branch' '
57 cd "$ROOT_PATH"/test_repo_clone &&
58 git checkout -b dev &&
63 git push origin dev &&
65 git push origin :dev &&
66 git branch -d -r origin/dev &&
68 ! git show-ref --verify refs/remotes/origin/dev