mv: Fix spurious warning when moving a file in presence of submodules
[gitweb.git] / t / lib-httpd.sh
index e2eca1fad0c1d06d37d3567c513ca565663707cf..54dbbfe5ceeb9bf91cdad3393c2fdfe95c06fd18 100644 (file)
@@ -141,10 +141,11 @@ stop_httpd() {
                -f "$TEST_PATH/apache.conf" $HTTPD_PARA -k stop
 }
 
-test_http_push_nonff() {
+test_http_push_nonff () {
        REMOTE_REPO=$1
        LOCAL_REPO=$2
        BRANCH=$3
+       EXPECT_CAS_RESULT=${4-failure}
 
        test_expect_success 'non-fast-forward push fails' '
                cd "$REMOTE_REPO" &&
@@ -168,7 +169,7 @@ test_http_push_nonff() {
                test_i18ngrep "Updates were rejected because" output
        '
 
-       test_expect_failure 'force with lease aka cas' '
+       test_expect_${EXPECT_CAS_RESULT} 'force with lease aka cas' '
                HEAD=$( cd "$REMOTE_REPO" && git rev-parse --verify HEAD ) &&
                test_when_finished '\''
                        (cd "$REMOTE_REPO" && git update-ref HEAD "$HEAD")