From e68afaccdb63d88b499645d20b470250425c657c Mon Sep 17 00:00:00 2001 From: Andrei Neagu Date: Mon, 9 Dec 2024 16:40:27 +0100 Subject: [PATCH] refactor test --- services/web/server/tests/unit/isolated/test_tracing.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/web/server/tests/unit/isolated/test_tracing.py b/services/web/server/tests/unit/isolated/test_tracing.py index 0b5069c7fe1..7d302d308be 100644 --- a/services/web/server/tests/unit/isolated/test_tracing.py +++ b/services/web/server/tests/unit/isolated/test_tracing.py @@ -17,16 +17,18 @@ def mock_webserver_service_environment( monkeypatch: pytest.MonkeyPatch, mock_webserver_service_environment: EnvVarsDict ) -> EnvVarsDict: - - return mock_webserver_service_environment | setenvs_from_dict( + envs = mock_webserver_service_environment | setenvs_from_dict( monkeypatch, { - "WEBSERVER_TRACING": "{}", "TRACING_OPENTELEMETRY_COLLECTOR_ENDPOINT": "http://opentelemetry-collector", "TRACING_OPENTELEMETRY_COLLECTOR_PORT": "4318", }, ) + envs.pop("WEBSERVER_TRACING") + + return envs + def test_middleware_restrictions_opentelemetry_is_second_middleware( mock_webserver_service_environment: EnvVarsDict,