Skip to content

Commit

Permalink
This is why we now have tests, right?
Browse files Browse the repository at this point in the history
It's really nice to have tests to catch this stuff now.
  • Loading branch information
Michael Stella committed Dec 7, 2020
1 parent bc08844 commit f312ad0
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,12 @@ def handler(request, context):

# make sure this span errored, with the right status and detail
self.assertEqual(span.status.status_code, StatusCode.ERROR)
self.assertEqual(span.status.description, failure_message)
self.assertEqual(
span.status.description,
"{}:{}".format(
grpc.StatusCode.FAILED_PRECONDITION, failure_message
),
)

# Check attributes
self.assert_span_has_attributes(
Expand Down

0 comments on commit f312ad0

Please sign in to comment.