Test: auto-cleanup system plugin #11

Open
opened 2026-06-02 20:29:26 +00:00 by jmiller · 1 comment
Owner

Verify the system plugin cleans up old backups correctly.

Scope

  • Age-based cleanup (max_age_days)
  • Count-based cleanup (max_backups)
  • Throttling (once per hour)
  • Only admin page loads trigger cleanup
  • Only completed backups eligible

Acceptance Criteria

  • Backups older than max_age_days are deleted
  • Excess backups beyond max_backups are deleted (oldest first)
  • Archive files are deleted along with records
  • Running/failed backups are not cleaned up
  • Cleanup runs at most once per hour
Verify the system plugin cleans up old backups correctly. ## Scope - Age-based cleanup (max_age_days) - Count-based cleanup (max_backups) - Throttling (once per hour) - Only admin page loads trigger cleanup - Only completed backups eligible ## Acceptance Criteria - [ ] Backups older than max_age_days are deleted - [ ] Excess backups beyond max_backups are deleted (oldest first) - [ ] Archive files are deleted along with records - [ ] Running/failed backups are not cleaned up - [ ] Cleanup runs at most once per hour
jmiller added the type: testingpriority: mediumcomponent: enginestatus: ready labels 2026-06-02 20:29:26 +00:00
Author
Owner

Testing Plan

TC-11.1: Age-based cleanup

  1. Set max_age_days=1 in plugin settings
  2. Manually backdate a backup record to 2 days ago
  3. Load any admin page
  4. Verify old backup record and file are deleted

TC-11.2: Count-based cleanup

  1. Set max_backups=3
  2. Create 5 backups
  3. Trigger cleanup
  4. Verify only 3 newest remain

TC-11.3: Running backups preserved

  1. Set a backup record status to "running"
  2. Trigger cleanup
  3. Verify running backup is NOT deleted

TC-11.4: Throttling

  1. Trigger cleanup
  2. Create a new backup that should be cleaned
  3. Load admin page within 1 hour
  4. Verify cleanup did NOT run again (session throttle)

TC-11.5: File deletion

  1. Verify that when a record is cleaned up, the actual ZIP file is also deleted from disk
## Testing Plan **TC-11.1: Age-based cleanup** 1. Set max_age_days=1 in plugin settings 2. Manually backdate a backup record to 2 days ago 3. Load any admin page 4. Verify old backup record and file are deleted **TC-11.2: Count-based cleanup** 1. Set max_backups=3 2. Create 5 backups 3. Trigger cleanup 4. Verify only 3 newest remain **TC-11.3: Running backups preserved** 1. Set a backup record status to "running" 2. Trigger cleanup 3. Verify running backup is NOT deleted **TC-11.4: Throttling** 1. Trigger cleanup 2. Create a new backup that should be cleaned 3. Load admin page within 1 hour 4. Verify cleanup did NOT run again (session throttle) **TC-11.5: File deletion** 1. Verify that when a record is cleaned up, the actual ZIP file is also deleted from disk
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoJoomBackup#11