Repository navigation
Fix authserver test build on main - #6950
Merged
Merged
Conversation
The pkg/authserver tests do not compile on main. #6930 gave buildProvider two more parameters (the upstream token refresher and the upstreams), and #6945 added BuildProviderForTest in export_test.go, which still called it with three arguments. Each change passed CI on its own; together they broke the Main build. Pass nil for both. BuildProviderForTest skips upstream construction on purpose, and a nil refresher leaves the upstream refresh guard out. The guard would sit inside the refreshGrantValidators wrapper, which is the one handler the tests that use this helper can see, so the handler list they check is the same. Co-authored-by: Mecatl <[email protected]>
jhrozek
requested review from
ChrisJBurns,
JAORMX,
rdimitrov and
tgrunnagle
as code owners
October 26, 2026 23:05
jerm-dro
approved these changes
Oct 26, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6950 +/- ##
==========================================
- Coverage 80.17% 80.15% -0.03%
==========================================
Files 841 844 +3
Lines 85500 85647 +147
==========================================
+ Hits 68553 68653 +100
- Misses 16942 16989 +47
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ChrisJBurns
approved these changes
Oct 26, 2026
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.
Summary
pkg/authservertests do not compile onmain, so the "Main build" run for Stop serving delegate clients removed from config #6945 failed. Refuse refresh grants whose upstream credential is dead #6930 gavebuildProvidertwo more parameters (the upstream token refresher and the upstreams). Stop serving delegate clients removed from config #6945 addedBuildProviderForTestinexport_test.go, which still calledbuildProviderwith three arguments. Each PR passed CI on its own and they broke the build once both landed.nil, nilfor the two new parameters inBuildProviderForTest, with a comment saying why.A nil refresher leaves the upstream refresh guard out of the handler chain. The guard would sit inside the
refreshGrantValidatorswrapper, which is the one handler the tests that use this helper can see. They check that no token endpoint handler skips client authentication, andBuildProviderForTestskips upstream construction on purpose. The handler list those tests compare against is unchanged.Type of change
Test plan
task test) —go test -race ./pkg/authserver, the package that did not compile. Not the whole repository.task lint-fix) —golangci-lintandgo veton./pkg/authserver, no findingsDoes this introduce a user-facing change?
No. This is a test-only change.
🤖 Generated with Claude Code