]> Kevux Git Server - rit/commit
t5551: do not confirm that bogus url cannot be used
authorJeff King <peff@peff.net>
Wed, 26 Jun 2024 20:55:25 +0000 (16:55 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 26 Jun 2024 21:31:18 +0000 (14:31 -0700)
commite6653ec3c6c9024481f8f948f6d9f16ad0b64a31
treea631581e5861bd2693ca63e3dff2a79672598494
parent63ec97faf7ab535fba4355fe9333fdc7ea61a7bc
t5551: do not confirm that bogus url cannot be used

t5551 tries to access a URL with a bogus hostname and confirms that
http.curloptResolve lets us use this otherwise unresolvable name.

Before doing so, though, we confirm that trying to access the bogus
hostname without http.curloptResolve fails as expected. This isn't
testing Git at all, but is confirming the test's assumptions. That's
often a good thing to do, but in this case it means that we'll actually
try to resolve the external name. Even though it's unlikely that
"gitbogusexamplehost.invalid" would ever resolve, the DNS lookup itself
may take time.

It's probably reasonable to just assume that this obviously-bogus name
would not actually resolve in practice, which lets us reduce our test
suite's dependency on the outside world.

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