Repository navigation
[test-improver] Improve tests for oidc Provider - #15996
Conversation
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The changes are limited to improving error handling and assertion consistency in OIDC provider tests, with no production behavior changes or active review issues identified.
No open issues 🎉
What changed in this PR
This pull request improves assertion consistency and error handling in OIDC provider tests without changing production behavior or coverage.
This pull request is ready to be approved.
Changes:
- Replaces
panicafterjson.Marshalfailure withrequire.NoError. - Replaces manual error reporting in the hijacking test with Testify assertions.
- Preserves the existing 100% package coverage.
| File | Description |
|---|---|
internal/oidc/provider_test.go |
Replaces panic and manual test error handling with consistent Testify assertions. |
Review effort: Lite (auto)
🔒 mcpg Read-Only Stress — defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE No write, reaction, star, issue, comment, branch, file, or PR was created or leaked in this run. No FAIL condition observed.
|
File:
internal/oidc/provider_test.goImprovements
t.Error/t.Errorfchecks in the hijacking test handler withassert.True/assert.NoError.paniconjson.Marshalfailure inTestProvider_JWTWithoutExpirywithrequire.NoError.Coverage: 100% before and after (the package was already fully covered).
Verification:
go vet,gofmt -l, andgo test -count=3 ./internal/oidc/all pass.