Skip to content

Commit 36fa475

Browse files
committed
attempt to fix proxy issues during regression tests
1 parent 4674c0c commit 36fa475

File tree

1 file changed

+4
-2
lines changed
  • airbyte-ci/connectors/live-tests/src/live_tests/commons

1 file changed

+4
-2
lines changed

airbyte-ci/connectors/live-tests/src/live_tests/commons/proxy.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,15 @@ async def bind_container(self, container: dagger.Container) -> dagger.Container:
130130
python_version_output = (await container.with_exec(["python", "--version"]).stdout()).strip()
131131
python_version = python_version_output.split(" ")[-1]
132132
python_version_minor_only = ".".join(python_version.split(".")[:-1])
133-
requests_cert_path = f"/usr/local/lib/python{python_version_minor_only}/site-packages/certifi/cacert.pem"
133+
# requests_cert_path = f"/usr/local/lib/python{python_version_minor_only}/site-packages/certifi/cacert.pem"
134+
mitm_cert_path = "/etc/ssl/certs/mitmproxy-ca.pem"
134135
current_user = (await container.with_exec(["whoami"]).stdout()).strip()
135136
try:
136137
return await (
137138
container.with_user("root")
138139
# Overwrite the requests cert file with the mitmproxy self-signed certificate
139-
.with_file(requests_cert_path, pem, owner=current_user)
140+
.with_file(mitm_cert_path, pem, owner=current_user)
141+
.with_env_variable("REQUESTS_CA_BUNDLE", mitm_cert_path)
140142
.with_env_variable("http_proxy", f"{self.hostname}:{self.PROXY_PORT}")
141143
.with_env_variable("https_proxy", f"{self.hostname}:{self.PROXY_PORT}")
142144
.with_user(current_user)

0 commit comments

Comments
 (0)