vikunja/pkg
kolaente a7086e5e49 fix: prevent session leaks and visibility issues in model tests
Two categories of fixes:

1. Use defer s.Close() instead of explicit s.Close() to prevent session
   leaks when require.FailNow() triggers runtime.Goexit(), which skips
   explicit close calls but runs deferred functions. Leaked sessions
   hold SQLite write locks that block all subsequent fixture loading.

2. Add s.Commit() before db.AssertExists/db.AssertMissing calls. These
   assertion helpers query via the global engine (not the test session),
   so they cannot see uncommitted data from the session's transaction.

For block-scoped sessions (kanban_task_bucket_test.go), wrap each block
in an anonymous function so defer runs at block boundary rather than
deferring to the enclosing test function.
2026-02-25 11:03:02 +01:00
..
caldav fix(caldav): do not assume the first element is the VTODO component 2025-12-13 15:30:22 +01:00
cmd refactor: remove redundant Begin() calls after NewSession auto-begins 2026-02-25 11:03:02 +01:00
config feat: add jwtttlshort config key for session tokens 2026-02-25 10:30:25 +01:00
cron fix: correct license header references (#882) 2025-06-10 12:18:38 +02:00
db fix: handle Begin() error in db.NewSession() instead of ignoring it 2026-02-25 11:03:02 +01:00
doctor feat(doctor): add user namespace detection and improved storage diagnostics (#2180) 2026-02-01 11:57:35 +01:00
events fix(events): only trigger task.updated once when marking task done 2025-11-16 11:01:15 +01:00
files fix: remove transaction control from File.Delete to prevent premature commit/rollback 2026-02-25 11:03:02 +01:00
health feat: introduce shared health check logic (#1073) 2025-07-02 21:01:41 +00:00
i18n chore(i18n): update translations via Crowdin 2026-02-21 01:09:54 +00:00
initialize feat: add Session model with CRUD, permissions, and cleanup cron 2026-02-25 10:30:25 +01:00
log fix(log): write each log category to its own file (#2206) 2026-02-08 15:22:58 +00:00
mail fix(mail): disable queue when mailer disabled (#2069) 2026-01-08 15:51:31 +01:00
metrics fix: correct license header references (#882) 2025-06-10 12:18:38 +02:00
migration feat: add sessions table migration 2026-02-25 10:30:25 +01:00
models fix: prevent session leaks and visibility issues in model tests 2026-02-25 11:03:02 +01:00
modules fix: use session-aware file creation to avoid nested transactions 2026-02-25 11:03:02 +01:00
notifications fix: isolate deletion notifications into per-user transactions 2026-02-25 11:03:02 +01:00
plugins fix(deps): update module github.com/labstack/echo/v4 to v5 (#2131) 2026-01-24 20:38:32 +01:00
red fix: correct license header references (#882) 2025-06-10 12:18:38 +02:00
routes refactor: remove redundant Begin() calls after NewSession auto-begins 2026-02-25 11:03:02 +01:00
swagger [skip ci] Updated swagger docs 2026-02-25 09:39:04 +00:00
user fix: isolate deletion notifications into per-user transactions 2026-02-25 11:03:02 +01:00
utils feat(doctor): add user namespace detection and improved storage diagnostics (#2180) 2026-02-01 11:57:35 +01:00
version fix: correct license header references (#882) 2025-06-10 12:18:38 +02:00
web fix(deps): update module github.com/labstack/echo/v4 to v5 (#2131) 2026-01-24 20:38:32 +01:00
webtests test: add session lifecycle tests 2026-02-25 10:30:25 +01:00