PYTHON-5415 - Unskip tests that rely on server hostname (#2398)

This commit is contained in:
Noah Stapp 2025-07-07 09:59:48 -04:00 committed by GitHub
parent d6ab555b81
commit 11d3488026
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 30 additions and 0 deletions

View File

@ -38,4 +38,14 @@ if [ "$(uname -s)" = "Darwin" ]; then
fi
fi
if [ -w /etc/hosts ]; then
SUDO=""
else
SUDO="sudo"
fi
# Add 'server' and 'hostname_not_in_cert' as a hostnames
echo "127.0.0.1 server" | $SUDO tee -a /etc/hosts
echo "127.0.0.1 hostname_not_in_cert" | $SUDO tee -a /etc/hosts
echo "Setting up system... done."

View File

@ -304,8 +304,13 @@ class TestSSL(AsyncIntegrationTest):
client = self.simple_client(uri_fmt % (CLIENT_PEM, "true", CA_PEM))
await self.assertClientWorks(client)
@unittest.skipIf(
"PyPy" in sys.version and not _IS_SYNC,
"https://github.com/pypy/pypy/issues/5131 flaky on async PyPy due to SSL EOF",
)
@async_client_context.require_tlsCertificateKeyFile
@async_client_context.require_server_resolvable
@async_client_context.require_no_api_version
@ignore_deprecations
async def test_cert_ssl_validation_hostname_matching(self):
# Expects the server to be running with server.pem and ca.pem
@ -430,8 +435,13 @@ class TestSSL(AsyncIntegrationTest):
self.simple_client(uri_fmt % (CRL_PEM, CA_PEM), **self.credentials) # type: ignore[arg-type]
)
@unittest.skipIf(
"PyPy" in sys.version and not _IS_SYNC,
"https://github.com/pypy/pypy/issues/5131 flaky on async PyPy due to SSL EOF",
)
@async_client_context.require_tlsCertificateKeyFile
@async_client_context.require_server_resolvable
@async_client_context.require_no_api_version
@ignore_deprecations
async def test_validation_with_system_ca_certs(self):
# Expects the server to be running with server.pem and ca.pem.

View File

@ -304,8 +304,13 @@ class TestSSL(IntegrationTest):
client = self.simple_client(uri_fmt % (CLIENT_PEM, "true", CA_PEM))
self.assertClientWorks(client)
@unittest.skipIf(
"PyPy" in sys.version and not _IS_SYNC,
"https://github.com/pypy/pypy/issues/5131 flaky on async PyPy due to SSL EOF",
)
@client_context.require_tlsCertificateKeyFile
@client_context.require_server_resolvable
@client_context.require_no_api_version
@ignore_deprecations
def test_cert_ssl_validation_hostname_matching(self):
# Expects the server to be running with server.pem and ca.pem
@ -430,8 +435,13 @@ class TestSSL(IntegrationTest):
self.simple_client(uri_fmt % (CRL_PEM, CA_PEM), **self.credentials) # type: ignore[arg-type]
)
@unittest.skipIf(
"PyPy" in sys.version and not _IS_SYNC,
"https://github.com/pypy/pypy/issues/5131 flaky on async PyPy due to SSL EOF",
)
@client_context.require_tlsCertificateKeyFile
@client_context.require_server_resolvable
@client_context.require_no_api_version
@ignore_deprecations
def test_validation_with_system_ca_certs(self):
# Expects the server to be running with server.pem and ca.pem.