super-productivity/packages/super-sync-server/tests
Johannes Millan 9ee15b9f08 fix(sync): iteratively cleanup storage until quota satisfied
When storage quota is exceeded, the server now iteratively deletes
old restore points and operations until enough space is freed,
keeping at least one restore point as minimum valid sync state.

Changes:
- Add freeStorageForUpload() method that loops until quota satisfied
- Update deleteOldestRestorePointAndOps() to clear stale snapshot cache
- Update /ops and /snapshot routes to use iterative cleanup
- Add comprehensive tests for new cleanup behavior

The error response now includes cleanupStats showing what was freed
even when cleanup ultimately fails due to minimum data requirements.
2025-12-25 10:18:35 +01:00
..
integration test(sync-server): add tests for snapshot skip optimization 2025-12-17 11:36:04 +01:00
api.routes.spec.ts fix: harden supersync entity allowlist and verify-email route 2025-12-12 20:48:40 +01:00
auth-flows.spec.ts Fix super-sync server auth and snapshot safety 2025-12-12 20:48:13 +01:00
conflict-detection.spec.ts test(sync-server): add unit tests for auth, conflicts, gaps, and ops 2025-12-12 20:47:48 +01:00
email.spec.ts Fix super-sync server auth and snapshot safety 2025-12-12 20:48:13 +01:00
gap-detection.spec.ts fix(sync): add gap detection for server reset and stale client scenarios 2025-12-12 20:47:48 +01:00
registration-api.spec.ts chore(sync-server): update npm scripts and expand legal docs 2025-12-15 13:47:42 +01:00
setup.ts fix(sync): address 5 critical sync system issues 2025-12-21 21:56:01 +01:00
snapshot-skip-optimization.spec.ts test(sync-server): add comprehensive edge case tests for snapshot skip 2025-12-17 11:42:32 +01:00
storage-quota-cleanup.spec.ts fix(sync): iteratively cleanup storage until quota satisfied 2025-12-25 10:18:35 +01:00
sync-fixes.spec.ts fix(sync): refresh storage cache after cleanup and add serverTime to response 2025-12-23 18:31:57 +01:00
sync-operations.spec.ts fix: harden supersync entity allowlist and verify-email route 2025-12-12 20:48:40 +01:00
sync-types.spec.ts fix(sync): address 5 critical sync system issues 2025-12-22 10:32:57 +01:00
sync.routes.spec.ts fix(sync): refresh storage cache after cleanup and add serverTime to response 2025-12-23 18:31:57 +01:00
sync.service.spec.ts fix(sync): refresh storage cache after cleanup and add serverTime to response 2025-12-23 18:31:57 +01:00