orgtoken.Validate() runs a synchronous UPDATE org_api_tokens SET last_used_at after every successful auth scan. Tests were missing the sqlmock ExpectExec for this call — the code discards the error (_, _ = ExecContext) so CI passed, but ExpectationsWereMet() could not detect a regression where the UPDATE was accidentally removed. Adds strict mock expectations for all four WorkspaceAuth+org-token test cases: SetsOrgIDContext, OrgIDNULL_DoesNotSetContext, DBRowScanError_DoesNotPanic, and SetsAllContextKeys. Fixes: GH#1774 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cmd/server | ||
| internal | ||
| migrations | ||
| pkg/provisionhook | ||
| .ci-force | ||
| .gitignore | ||
| .golangci.yaml | ||
| Dockerfile | ||
| Dockerfile.tenant | ||
| entrypoint-tenant.sh | ||
| go.mod | ||
| go.sum | ||