diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2db4e4d..f6d5abe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,6 +61,8 @@ rails e2e spec: MAILGUN_DOMAIN: blackbox.example.com RAILS_LOG_TO_STDOUT: "1" RAILS_SERVE_STATIC_FILES: "1" + NO_PROXY: app,postgres,localhost,127.0.0.1 + no_proxy: app,postgres,localhost,127.0.0.1 TURNIERE_E2E_BASE_URL: http://app:3000 TURNIERE_E2E_EMAIL: e2e@example.com TURNIERE_E2E_PASSWORD: password123 diff --git a/tasks.py b/tasks.py index 60e42c4..aa85ee6 100644 --- a/tasks.py +++ b/tasks.py @@ -45,10 +45,11 @@ def _env(**overrides): def _wait_for_http(base_url=TEST_BASE_URL, timeout=60): deadline = time.time() + timeout healthz_url = f"{base_url}/healthz" + opener = urllib.request.build_opener(urllib.request.ProxyHandler({})) while time.time() < deadline: try: - with urllib.request.urlopen(healthz_url) as response: + with opener.open(healthz_url) as response: if response.status == 200: return except Exception: