Skip to content

Fix authserver test build on main - #6950

Merged
ChrisJBurns merged 1 commit into
mainfrom
fix-authserver-test-build
Oct 26, 2026
Merged

ChrisJBurns merged 1 commit into
mainfrom
fix-authserver-test-build

Conversation

@jhrozek

@jhrozek jhrozek commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Summary

A nil refresher leaves the upstream refresh guard out of the handler chain. The guard would sit inside the refreshGrantValidators wrapper, which is the one handler the tests that use this helper can see. They check that no token endpoint handler skips client authentication, and BuildProviderForTest skips upstream construction on purpose. The handler list those tests compare against is unchanged.

Type of change

  • Bug fix

Test plan

  • Unit tests (task test) — go test -race ./pkg/authserver, the package that did not compile. Not the whole repository.
  • Linting (task lint-fix) — golangci-lint and go vet on ./pkg/authserver, no findings

Does this introduce a user-facing change?

No. This is a test-only change.

🤖 Generated with Claude Code

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]>
@github-actions github-actions Bot added the size/XS Extra small PR: < 100 lines changed label Oct 26, 2026
@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.15%. Comparing base (1bc3bed) to head (fd4d16c).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisJBurns
ChrisJBurns merged commit 1d6b531 into main Oct 26, 2026
48 checks passed
@ChrisJBurns
ChrisJBurns deleted the fix-authserver-test-build branch October 26, 2026 23:25
@github-actions github-actions Bot mentioned this pull request Oct 27, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants