Return (ca_pem, cert_pem, key_pem) for the provisioned mTLS client.
(
cluster_name: str, server_endpoint: tuple[str, int, str]
)
| 118 | |
| 119 | @pytest.fixture(scope="session") |
| 120 | def mtls_certs( |
| 121 | cluster_name: str, server_endpoint: tuple[str, int, str] |
| 122 | ) -> tuple[bytes, bytes, bytes]: |
| 123 | """Return (ca_pem, cert_pem, key_pem) for the provisioned mTLS client.""" |
| 124 | _, _, scheme = server_endpoint |
| 125 | if scheme != "https": |
| 126 | pytest.skip("server is not using TLS; mTLS tests require an HTTPS endpoint") |
| 127 | mtls = _mtls_dir(cluster_name) |
| 128 | ca = (mtls / "ca.crt").read_bytes() |
| 129 | cert = (mtls / "tls.crt").read_bytes() |
| 130 | key = (mtls / "tls.key").read_bytes() |
| 131 | return ca, cert, key |
| 132 | |
| 133 | |
| 134 | # --------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected