MCPcopy Create free account
hub / github.com/apache/arrow / test_mtls

Function test_mtls

python/pyarrow/tests/test_flight.py:2230–2245  ·  view source on GitHub ↗

Test mutual TLS (mTLS) with gRPC.

()

Source from the content-addressed store, hash-verified

2228
2229@pytest.mark.requires_testing_data
2230def test_mtls():
2231 """Test mutual TLS (mTLS) with gRPC."""
2232 certs = example_tls_certs()
2233 table = simple_ints_table()
2234
2235 with ConstantFlightServer(
2236 tls_certificates=[certs["certificates"][0]],
2237 verify_client=True,
2238 root_certificates=certs["root_cert"]) as s, \
2239 FlightClient(
2240 ('localhost', s.port),
2241 tls_root_certs=certs["root_cert"],
2242 cert_chain=certs["certificates"][0].cert,
2243 private_key=certs["certificates"][0].key) as client:
2244 data = client.do_get(flight.Ticket(b'ints')).read_all()
2245 assert data.equals(table)
2246
2247
2248def test_doexchange_get():

Callers

nothing calls this directly

Calls 6

FlightClientClass · 0.90
example_tls_certsFunction · 0.85
simple_ints_tableFunction · 0.85
equalsMethod · 0.80
do_getMethod · 0.45

Tested by

no test coverage detected