zed
zed copied to clipboard
Reorganize `backupCreate` code and refactor tests accordingly
Our unit tests currently set up a full server for the client to talk to. This means that it's difficult to test things like "what happens when the response is PermissionDenied?" It'd be better if we had a backupCreateImpl that took a client and the other dependencies and then that's the primary thing that's tested, and the outer function does the work of setting up the client.
It'd also be good to separate the progress file logic into a separate layer so that we don't need to mess with the defer logic as it currently stands.