Test mutual TLS (mTLS) with gRPC.
()
| 2228 | |
| 2229 | @pytest.mark.requires_testing_data |
| 2230 | def 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 | |
| 2248 | def test_doexchange_get(): |
nothing calls this directly
no test coverage detected