zed
zed copied to clipboard
Refactor backupCreate for testability
This PR makes the backup creation code easier to test by extracting dependencies.
Changes
- Extract
backupCreateImplthat accepts a client and progress tracker as dependencies - Add
ProgressTrackerinterface to separate progress file logic from backup logic - Now possible to test edge cases like PermissionDenied without spinning up a full server
Also fixes a time.Tick goroutine leak along the way.
Resolves #569