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

Function test_mtls

python/pyarrow/tests/test_flight.py:2192–2207  ·  view source on GitHub ↗

Test mutual TLS (mTLS) with gRPC.

()

Source from the content-addressed store, hash-verified

2190
2191@pytest.mark.requires_testing_data
2192def test_mtls():
2193 """Test mutual TLS (mTLS) with gRPC."""
2194 certs = example_tls_certs()
2195 table = simple_ints_table()
2196
2197 with ConstantFlightServer(
2198 tls_certificates=[certs["certificates"][0]],
2199 verify_client=True,
2200 root_certificates=certs["root_cert"]) as s, \
2201 FlightClient(
2202 ('localhost', s.port),
2203 tls_root_certs=certs["root_cert"],
2204 cert_chain=certs["certificates"][0].cert,
2205 private_key=certs["certificates"][0].key) as client:
2206 data = client.do_get(flight.Ticket(b'ints')).read_all()
2207 assert data.equals(table)
2208
2209
2210def 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