Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove log pollution from charm tracing in scenario tests #220

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions tests/scenario/test_machine_charm/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from unittest.mock import PropertyMock, patch

import pytest
from charms.tempo_coordinator_k8s.v0.charm_tracing import charm_tracing_disabled


@pytest.fixture
Expand Down Expand Up @@ -39,3 +40,9 @@ def mock_refresh():
@pytest.fixture(params=CONFIG_MATRIX)
def charm_config(request):
return request.param


@pytest.fixture(autouse=True)
def mock_charm_tracing():
with charm_tracing_disabled():
yield
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ def test_tracing_sampling_config_is_present(
"tracing",
remote_app_data=TracingProviderAppData(
receivers=[
Receiver(protocol={"name": "otlp_grpc", "type": "grpc"}, url="http:foo.com:1111")
Receiver(protocol={"name": "otlp_grpc", "type": "grpc"}, url="http:foo.com:1111"),
Receiver(
protocol={"name": "otlp_http", "type": "http"}, url="http://localhost:1112"
),
]
).dump(),
)
Expand Down
Loading