#116: DataTransferAuditDaoTest.kt

plugins/org.projectforge.plugins.datatransfer/src/test/kotlin/org/projectforge/plugins/datatransfer/DataTransferAuditDaoTest.kt Path: plugins/...datatransfer/src/test/kotlin/.../DataTransferAuditDaoTest.kt · Lines: 151 · Type: Kotlin JUnit 5 integration test 151 lines · 117 code · 23 comments · 11 blank

Integration test for DataTransferAuditDao — verifies the audit log DAO's queue management, notification tracking, and entry retrieval. Extends AbstractTestBase with Spring autowired DAOs and recreateDataBase() for test isolation.

Test methods (from source analysis)

Test setup

Audit queue system

The audit queue is the mechanism for observer notifications (see mail template #112):

  1. File actions (upload/download/delete) call dataTransferAuditDao.insert() with notified=false
  2. A scheduled job calls internalGetQueuedEntriesByAreaId() to find un-notified entries
  3. After sending emails, the job marks entries as notified=true (via removeFromQueue())
  4. Old entries (>30 days) are periodically purged