Make sure clients cannot connect when cert verification fails.
()
| 1734 | @pytest.mark.slow |
| 1735 | @pytest.mark.requires_testing_data |
| 1736 | def test_tls_fails(): |
| 1737 | """Make sure clients cannot connect when cert verification fails.""" |
| 1738 | certs = example_tls_certs() |
| 1739 | |
| 1740 | # Ensure client doesn't connect when certificate verification |
| 1741 | # fails (this is a slow test since gRPC does retry a few times) |
| 1742 | with ConstantFlightServer(tls_certificates=certs["certificates"]) as s, \ |
| 1743 | FlightClient("grpc+tls://localhost:" + str(s.port)) as client: |
| 1744 | # gRPC error messages change based on version, so don't look |
| 1745 | # for a particular error |
| 1746 | with pytest.raises(flight.FlightUnavailableError): |
| 1747 | client.do_get(flight.Ticket(b'ints')).read_all() |
| 1748 | |
| 1749 | |
| 1750 | @pytest.mark.requires_testing_data |
nothing calls this directly
no test coverage detected