Skip to content

Commit

Permalink
Remove log pollution from charm tracing in scenario tests (#220)
Browse files Browse the repository at this point in the history
* Remove log pollution from charm tracing in scenario tests

* fmt
  • Loading branch information
mmkay authored Dec 6, 2024
1 parent e418c2e commit 7af0833
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
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

0 comments on commit 7af0833

Please sign in to comment.