Skip to content

Commit

Permalink
explicitly test unknown_service fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Sep 27, 2023
1 parent 1347df7 commit 01694f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion opentelemetry-resourcedetector-gcp/tests/test_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
),
pytest.param(
{
"service.name": "unknown_service",
"cloud.region": "myregion",
"service.namespace": "servicens",
"faas.name": "faasname",
Expand All @@ -175,6 +176,7 @@
),
pytest.param(
{
"service.name": "unknown_service",
"cloud.region": "myregion",
"service.namespace": "servicens",
"faas.instance": "faasinstance",
Expand Down Expand Up @@ -230,7 +232,7 @@
def test_get_monitored_resource(
otel_attributes: Attributes, snapshot: SnapshotAssertion
) -> None:
resource = Resource.create(otel_attributes)
resource = Resource(otel_attributes)
monitored_resource_data = get_monitored_resource(resource)
as_dict = dataclasses.asdict(monitored_resource_data)
assert as_dict == snapshot
Expand Down

0 comments on commit 01694f3

Please sign in to comment.