From ed17770ac8cd36a73044f8ffd5b9eb289864b480 Mon Sep 17 00:00:00 2001 From: Matus Drobuliak <60785969+matusdrobuliak66@users.noreply.github.com> Date: Mon, 9 Dec 2024 19:09:22 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20failing=20opentelemetry=20?= =?UTF-8?q?unit=20test=20(#6927)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/web/server/tests/unit/isolated/test_tracing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/web/server/tests/unit/isolated/test_tracing.py b/services/web/server/tests/unit/isolated/test_tracing.py index ddec0d10422..c236e446ab9 100644 --- a/services/web/server/tests/unit/isolated/test_tracing.py +++ b/services/web/server/tests/unit/isolated/test_tracing.py @@ -17,14 +17,15 @@ def mock_webserver_service_environment( monkeypatch: pytest.MonkeyPatch, mock_webserver_service_environment: EnvVarsDict ) -> EnvVarsDict: - - return mock_webserver_service_environment | setenvs_from_dict( + monkeypatch.delenv("WEBSERVER_TRACING") + envs = mock_webserver_service_environment | setenvs_from_dict( monkeypatch, { "TRACING_OPENTELEMETRY_COLLECTOR_ENDPOINT": "http://opentelemetry-collector", "TRACING_OPENTELEMETRY_COLLECTOR_PORT": "4318", }, ) + return envs def test_middleware_restrictions_opentelemetry_is_second_middleware(