Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions shared/observability/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,15 @@

import os

import pytest

os.environ["_AIRFLOW__AS_LIBRARY"] = "true"


@pytest.fixture(autouse=True)
def clear_otel_env_vars(monkeypatch):
# These tests run on the CI runner itself, and a runner may export OTEL_* variables for its own
# OpenTelemetry collector (RunsOn does), which take precedence over the Airflow configuration.
for name in list(os.environ):
if name.startswith("OTEL_"):
monkeypatch.delenv(name)