aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-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"