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