summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/lib-gpg.sh3
-rw-r--r--t/lib-httpd.sh1
-rw-r--r--t/lib-httpd/apache.conf4
-rw-r--r--t/lib-httpd/error-smart-http.sh3
-rwxr-xr-xt/t3418-rebase-continue.sh3
-rwxr-xr-xt/t5403-post-checkout-hook.sh2
-rwxr-xr-xt/t5551-http-fetch-smart.sh5
-rwxr-xr-xt/t9833-errors.sh27
8 files changed, 15 insertions, 33 deletions
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index f1277bef4f..8d28652b72 100755
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -63,8 +63,7 @@ then
cut -d" " -f4 |
tr -d '\n' >"${GNUPGHOME}/trustlist.txt" &&
- echo " S relax" >> ${GNUPGHOME}/trustlist.txt &&
- (gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) &&
+ echo " S relax" >>"${GNUPGHOME}/trustlist.txt" &&
echo hello | gpgsm --homedir "${GNUPGHOME}" >/dev/null \
-u committer@example.com -o /dev/null --sign - 2>&1 &&
test_set_prereq GPGSM
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index e465116ef9..216281eabc 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -131,6 +131,7 @@ prepare_httpd() {
mkdir -p "$HTTPD_DOCUMENT_ROOT_PATH"
cp "$TEST_PATH"/passwd "$HTTPD_ROOT_PATH"
install_script broken-smart-http.sh
+ install_script error-smart-http.sh
install_script error.sh
install_script apply-one-time-sed.sh
diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index 5d63ed90c5..06a81b54c7 100644
--- a/t/lib-httpd/apache.conf
+++ b/t/lib-httpd/apache.conf
@@ -119,6 +119,7 @@ Alias /auth/dumb/ www/auth/dumb/
ScriptAliasMatch /error_git_upload_pack/(.*)/git-upload-pack error.sh/
ScriptAliasMatch /smart_*[^/]*/(.*) ${GIT_EXEC_PATH}/git-http-backend/$1
ScriptAlias /broken_smart/ broken-smart-http.sh/
+ScriptAlias /error_smart/ error-smart-http.sh/
ScriptAlias /error/ error.sh/
ScriptAliasMatch /one_time_sed/(.*) apply-one-time-sed.sh/$1
<Directory ${GIT_EXEC_PATH}>
@@ -127,6 +128,9 @@ ScriptAliasMatch /one_time_sed/(.*) apply-one-time-sed.sh/$1
<Files broken-smart-http.sh>
Options ExecCGI
</Files>
+<Files error-smart-http.sh>
+ Options ExecCGI
+</Files>
<Files error.sh>
Options ExecCGI
</Files>
diff --git a/t/lib-httpd/error-smart-http.sh b/t/lib-httpd/error-smart-http.sh
new file mode 100644
index 0000000000..e65d447fc4
--- /dev/null
+++ b/t/lib-httpd/error-smart-http.sh
@@ -0,0 +1,3 @@
+echo "Content-Type: application/x-git-upload-pack-advertisement"
+echo
+printf "%s" "0019ERR server-side error"
diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh
index 25aaacacfc..bdaa511bb0 100755
--- a/t/t3418-rebase-continue.sh
+++ b/t/t3418-rebase-continue.sh
@@ -262,9 +262,6 @@ test_expect_success '--reschedule-failed-exec' '
test_must_fail git -c rebase.rescheduleFailedExec=true \
rebase -x false HEAD^ 2>err &&
grep "^exec false" .git/rebase-merge/git-rebase-todo &&
- test_i18ngrep "has been rescheduled" err &&
- git rebase --abort &&
- test_must_fail git rebase -y false HEAD^ 2>err &&
test_i18ngrep "has been rescheduled" err
'
diff --git a/t/t5403-post-checkout-hook.sh b/t/t5403-post-checkout-hook.sh
index a539ffc080..a39b3b5c78 100755
--- a/t/t5403-post-checkout-hook.sh
+++ b/t/t5403-post-checkout-hook.sh
@@ -67,7 +67,7 @@ test_expect_success 'post-checkout is triggered on rebase with fast-forward' '
test_expect_success 'post-checkout hook is triggered by clone' '
mkdir -p templates/hooks &&
write_script templates/hooks/post-checkout <<-\EOF &&
- echo "$@" >$GIT_DIR/post-checkout.args
+ echo "$@" >"$GIT_DIR/post-checkout.args"
EOF
git clone --template=templates . clone3 &&
test -f clone3/.git/post-checkout.args
diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh
index 8630b0cc39..ba83e567e5 100755
--- a/t/t5551-http-fetch-smart.sh
+++ b/t/t5551-http-fetch-smart.sh
@@ -429,5 +429,10 @@ test_expect_success 'GIT_TRACE_CURL_NO_DATA prevents data from being traced' '
! grep "=> Send data" err
'
+test_expect_success 'server-side error detected' '
+ test_must_fail git clone $HTTPD_URL/error_smart/repo.git 2>actual &&
+ grep "server-side error" actual
+'
+
stop_httpd
test_done
diff --git a/t/t9833-errors.sh b/t/t9833-errors.sh
index 277d347012..47b312e1c9 100755
--- a/t/t9833-errors.sh
+++ b/t/t9833-errors.sh
@@ -45,33 +45,6 @@ test_expect_success 'ticket logged out' '
)
'
-test_expect_success 'create group with short ticket expiry' '
- P4TICKETS="$cli/tickets" &&
- echo "newpassword" | p4 login &&
- p4_add_user short_expiry_user &&
- p4 -u short_expiry_user passwd -P password &&
- p4 group -i <<-EOF &&
- Group: testgroup
- Timeout: 3
- Users: short_expiry_user
- EOF
-
- p4 users | grep short_expiry_user
-'
-
-test_expect_success 'git operation with expired ticket' '
- P4TICKETS="$cli/tickets" &&
- P4USER=short_expiry_user &&
- echo "password" | p4 login &&
- (
- cd "$git" &&
- git p4 sync &&
- sleep 5 &&
- test_must_fail git p4 sync 2>errmsg &&
- grep "failure accessing depot" errmsg
- )
-'
-
test_expect_success 'kill p4d' '
kill_p4d
'