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 10, 2020
1 parent 213682e commit f3abdbc
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 f3abdbc

Please sign in to comment.