Make sure clients cannot connect when cert verification fails.
()
| 1772 | @pytest.mark.slow |
| 1773 | @pytest.mark.requires_testing_data |
| 1774 | def test_tls_fails(): |
| 1775 | """Make sure clients cannot connect when cert verification fails.""" |
| 1776 | certs = example_tls_certs() |
| 1777 | |
| 1778 | # Ensure client doesn't connect when certificate verification |
| 1779 | # fails (this is a slow test since gRPC does retry a few times) |
| 1780 | with ConstantFlightServer(tls_certificates=certs["certificates"]) as s, \ |
| 1781 | FlightClient("grpc+tls://localhost:" + str(s.port)) as client: |
| 1782 | # gRPC error messages change based on version, so don't look |
| 1783 | # for a particular error |
| 1784 | with pytest.raises(flight.FlightUnavailableError): |
| 1785 | client.do_get(flight.Ticket(b'ints')).read_all() |
| 1786 | |
| 1787 | |
| 1788 | @pytest.mark.requires_testing_data |
nothing calls this directly
no test coverage detected