forked from molecule-ai/molecule-core
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> |
||
|---|---|---|
| .. | ||
| devmode_test.go | ||
| devmode.go | ||
| mcp_ratelimit_test.go | ||
| mcp_ratelimit.go | ||
| ratelimit_test.go | ||
| ratelimit.go | ||
| securityheaders_test.go | ||
| securityheaders.go | ||
| session_auth_test.go | ||
| session_auth.go | ||
| tenant_guard_test.go | ||
| tenant_guard.go | ||
| wsauth_middleware_org_id_test.go | ||
| wsauth_middleware_test.go | ||
| wsauth_middleware.go | ||