hierarchy: Use public API for testing#8846
Merged
arjan-bal merged 2 commits intogrpc:masterfrom Jan 21, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8846 +/- ##
==========================================
+ Coverage 83.18% 83.27% +0.08%
==========================================
Files 414 414
Lines 32720 32720
==========================================
+ Hits 27219 27246 +27
+ Misses 4086 4068 -18
+ Partials 1415 1406 -9 🚀 New features to boost your workflow:
|
arjan-bal
commented
Jan 21, 2026
internal/hierarchy/hierarchy_test.go
Outdated
Comment on lines
+29
to
+30
| // Tests that if hierarchy is set to a wrong type (which should never happen), | ||
| // the endpoint is ignored. |
Contributor
Author
There was a problem hiding this comment.
I am not sure how this scenario is reachable given that the key type is unexported, or why we are testing this behavior. However, I retained this test case to preserve existing coverage.
Contributor
There was a problem hiding this comment.
Seems a bit paranoid. I'm OK with removing that test.
easwars
approved these changes
Jan 21, 2026
mbissa
pushed a commit
to mbissa/grpc-go
that referenced
this pull request
Feb 16, 2026
As requested in grpc#8841 (comment), this PR moves existing tests to a different package to enforce the use of public APIs. One test remains in the old package as it requires access to the private attribute key type. RELEASE NOTES: N/A
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As requested in #8841 (comment), this PR moves existing tests to a different package to enforce the use of public APIs.
RELEASE NOTES: N/A