feat(pubsub): include subscription name in StreamingPull header#4585
feat(pubsub): include subscription name in StreamingPull header#4585haphungw merged 9 commits intogoogleapis:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4585 +/- ##
=======================================
Coverage 95.02% 95.02%
=======================================
Files 195 195
Lines 7456 7458 +2
=======================================
+ Hits 7085 7087 +2
Misses 371 371 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dbolduc
left a comment
There was a problem hiding this comment.
How can we test this so the code doesn't regress?
I have an idea (SPOILERS)
We have a mock Pub/Sub service ...
... which we use in the session.rs unit tests. Maybe we can add a new unit test where we extract the metadata from the incoming tonic::Request and check that it has the header we just set?
https://docs.rs/tonic/0.14.2/tonic/struct.Request.html#method.metadata
d10b0a8 to
d56698b
Compare
dbolduc
left a comment
There was a problem hiding this comment.
Looks great. I like having unit tests for each of the interfaces involved. (Plus the one you added in session.rs that ties them all together)
Fix #4470