aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-11-19 00:40:53 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-11-19 00:40:53 +0100
commitbf14ad38c20536dff922c46311daccd6a85f24a9 (patch)
tree9d029c52204fa5b4c577948b300586e6b38d7bbf
parent53ecd048919835a116fce1089b78a46a69ecb374 (diff)
downloadblogc-bf14ad38c20536dff922c46311daccd6a85f24a9.tar.gz
blogc-bf14ad38c20536dff922c46311daccd6a85f24a9.tar.bz2
blogc-bf14ad38c20536dff922c46311daccd6a85f24a9.zip
git-receiver: test manual mirror push
-rwxr-xr-xtests/blogc-git-receiver/check_post_receive.sh.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/blogc-git-receiver/check_post_receive.sh.in b/tests/blogc-git-receiver/check_post_receive.sh.in
index 6ed7f9d..925ab31 100755
--- a/tests/blogc-git-receiver/check_post_receive.sh.in
+++ b/tests/blogc-git-receiver/check_post_receive.sh.in
@@ -83,4 +83,34 @@ git init --bare "${TEMP}/repos/bar4.git" &> /dev/null
HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./hooks/post-receive 2>&1 | tee "${TEMP}/output.txt"
grep "warning: failed to parse configuration file " "${TEMP}/output.txt" &> /dev/null
+cd ..
+cat > "${TEMP}/blogc-git-receiver.ini" <<EOF
+[repo:boo.git]
+mirror = 123
+
+[repo:foo.git]
+mirror = ${TEMP}/repos/bar5.git
+
+[repo:bar.git]
+mirror = lol
+EOF
+git init --bare "${TEMP}/repos/bar5.git" &> /dev/null
+HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./foo.git/hooks/post-receive 2>&1 | tee "${TEMP}/output.txt"
+grep "[new branch] *master" "${TEMP}/output.txt" &> /dev/null
+
+cd ..
+cat > "${TEMP}/blogc-git-receiver.ini" <<EOF
+[repo:boo.git]
+mirror = 123
+
+[repo:foo.git]
+mirror = ${TEMP}/repos/bar6.git
+
+[repo:bar.git]
+mirror = lol
+EOF
+git init --bare "${TEMP}/repos/bar6.git" &> /dev/null
+HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./repos/foo.git/hooks/post-receive 2>&1 | tee "${TEMP}/output.txt"
+grep "[new branch] *master" "${TEMP}/output.txt" &> /dev/null
+
rm "${TEMP}/output.txt"