Skip to content

Commit f312ad0

Browse files
author
Michael Stella
committed
This is why we now have tests, right?
It's really nice to have tests to catch this stuff now.
1 parent bc08844 commit f312ad0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

instrumentation/opentelemetry-instrumentation-grpc/tests/test_server_interceptor.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,12 @@ def handler(request, context):
385385

386386
# make sure this span errored, with the right status and detail
387387
self.assertEqual(span.status.status_code, StatusCode.ERROR)
388-
self.assertEqual(span.status.description, failure_message)
388+
self.assertEqual(
389+
span.status.description,
390+
"{}:{}".format(
391+
grpc.StatusCode.FAILED_PRECONDITION, failure_message
392+
),
393+
)
389394

390395
# Check attributes
391396
self.assert_span_has_attributes(

0 commit comments

Comments
 (0)