Documentation/git-web--browse.txt: fix small typo
[git/platforms.git] / t / t5540-http-push.sh
blob7372439164d521df9c29d98b4507612013aba86b
1 #!/bin/sh
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.'
10 . ./test-lib.sh
12 ROOT_PATH="$PWD"
13 LIB_HTTPD_DAV=t
15 . ../lib-httpd.sh
17 if ! start_httpd >&3 2>&4
18 then
19 say "skipping test, web server setup failed"
20 test_done
21 exit
24 test_expect_success 'setup remote repository' '
25 cd "$ROOT_PATH" &&
26 mkdir test_repo &&
27 cd test_repo &&
28 git init &&
29 : >path1 &&
30 git add path1 &&
31 test_tick &&
32 git commit -m initial &&
33 cd - &&
34 git clone --bare test_repo test_repo.git &&
35 cd test_repo.git &&
36 git --bare update-server-info &&
37 chmod +x hooks/post-update &&
38 cd - &&
39 mv test_repo.git $HTTPD_DOCUMENT_ROOT_PATH
42 test_expect_success 'clone remote repository' '
43 cd "$ROOT_PATH" &&
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 &&
49 : >path2 &&
50 git add path2 &&
51 test_tick &&
52 git commit -m path2 &&
53 git push
56 test_expect_success 'create and delete remote branch' '
57 cd "$ROOT_PATH"/test_repo_clone &&
58 git checkout -b dev &&
59 : >path3 &&
60 git add path3 &&
61 test_tick &&
62 git commit -m dev &&
63 git push origin dev &&
64 git fetch &&
65 git push origin :dev &&
66 git branch -d -r origin/dev &&
67 git fetch &&
68 ! git show-ref --verify refs/remotes/origin/dev
71 stop_httpd
73 test_done