t5541: simplify and move "no empty path components" test
commitf1449a563ff78a2abfc570149a2db39c62398b68
authorJeff King <peff@peff.net>
Thu, 23 Feb 2023 10:51:35 +0000 (23 05:51 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Feb 2023 21:01:14 +0000 (23 13:01 -0800)
treefdfdc56fff64d85795c823fa63a41ad46de52d42
parent6ec90b5bf11ea9416715d31b8e3810e2915f1b9d
t5541: simplify and move "no empty path components" test

Commit 9ee6bcd398 (t5541-http-push: add test for URLs with trailing
slash, 2010-04-08) added a test that clones a URL with a trailing slash,
and confirms that we don't send a doubled slash (like "$url//info/refs")
to the server.

But this test makes no sense in t5541, which is about pushing. It should
have been added in t5551. Let's move it there.

But putting it at the end is tricky, since it checks the entire contents
of the Apache access log. We could get around this by clearing the log
before our test. But there's an even simpler solution: just make sure no
doubled slashes appear in the log (fortunately, "http://" does not
appear in the log itself).

As a bonus, this also lets us drop the check for the v0 protocol (which
is otherwise necessary since v2 makes multiple requests, and
check_access_log insists on exactly matching the number of requests,
even though we don't care about that here).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5541-http-push-smart.sh
t/t5551-http-fetch-smart.sh