Skip to content

Commit 64524be

Browse files
committed
t5551: make the test for extra HTTP headers more robust
To test that extra HTTP headers are passed correctly, t5551 verifies that a fetch succeeds when two required headers are passed, and that the fetch does not succeed when those headers are not passed. However, this test would also succeed if the configuration required only one header. As Apache's configuration is notoriously tricky (this developer frequently requires StackOverflow's help to understand Apache's documentation), especially when still supporting the 2.2 line, let's just really make sure that the test verifies what we want it to verify. Signed-off-by: Johannes Schindelin <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3f74de5 commit 64524be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t5551-http-fetch-smart.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ test_expect_success EXPENSIVE 'http can handle enormous ref negotiation' '
283283
'
284284

285285
test_expect_success 'custom http headers' '
286-
test_must_fail git fetch "$HTTPD_URL/smart_headers/repo.git" &&
286+
test_must_fail git -c http.extraheader="x-magic-two: cadabra" \
287+
fetch "$HTTPD_URL/smart_headers/repo.git" &&
287288
git -c http.extraheader="x-magic-one: abra" \
288289
-c http.extraheader="x-magic-two: cadabra" \
289290
fetch "$HTTPD_URL/smart_headers/repo.git"

0 commit comments

Comments
 (0)