feat: add mTLS ADC support for HTTP (#457)
feat: add mTLS ADC support for HTTP
diff --git a/tests/conftest.py b/tests/conftest.py
index 7f9a968..cf8a0f9 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -12,12 +12,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import os
import sys
import mock
import pytest
+def pytest_configure():
+ """Load public certificate and private key."""
+ pytest.data_dir = os.path.join(os.path.dirname(__file__), "data")
+
+ with open(os.path.join(pytest.data_dir, "privatekey.pem"), "rb") as fh:
+ pytest.private_key_bytes = fh.read()
+
+ with open(os.path.join(pytest.data_dir, "public_cert.pem"), "rb") as fh:
+ pytest.public_cert_bytes = fh.read()
+
+
@pytest.fixture
def mock_non_existent_module(monkeypatch):
"""Mocks a non-existing module in sys.modules.