summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-08-02 15:14:50 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-08-02 16:11:06 -0700
commit05c1eb10348f159908becc7a6ed6bbcdab24c893 (patch)
treebaa15650daafe64c4c07d463d6ba2996ca958623 /t
parentsend-pack: fix parsing of --force-with-lease option (diff)
downloadtgif-05c1eb10348f159908becc7a6ed6bbcdab24c893.tar.xz
push: teach --force-with-lease to smart-http transport
We have been passing enough information to enable the compare-and-swap logic down to the transport layer, but the transport helper was not passing it to smart-http transport. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r--t/lib-httpd.sh3
-rwxr-xr-xt/t5541-http-push.sh2
2 files changed, 3 insertions, 2 deletions
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index e2eca1fad0..dab405d574 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -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" &&
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index beb00be4b1..470ac54295 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -153,7 +153,7 @@ test_expect_success 'used receive-pack service' '
'
test_http_push_nonff "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \
- "$ROOT_PATH"/test_repo_clone master
+ "$ROOT_PATH"/test_repo_clone master success
test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper' '
# create a dissimilarly-named remote ref so that git is unable to match the