Closed ae-govau closed 4 months ago
Split PR as requestd. Note this PR currently has 2 commits, the first is also in separate PR #273 , but the test added in this PR for the new functionality needs it, so I've included it here.
Once #273 lands, I can rebase this one.
Can you rebase the PR now that #273 is merged?
Rebased. Tests are failing due to calens
not supporting a syntax specified on a verbatim tag. Happy to either remove that here, else I've made a PR to calens
to support: https://github.com/restic/calens/pull/18
What is the purpose of this change? What does it change?
Enhancement: add support for unix socket listen
Refactor main for easier testing, graceful termination and be able to prin the listening port after startup.
Add tests for both TCP and Unix socket listening.
The change to add unix socket listening was pretty simple, but the PR got bit bigger then I made some refactors to
main.go
to make it easier for testing (by removing use of gloabl variables).Was the change discussed in an issue or in the forum before?
Yes. This is the
rest-server
part of https://github.com/restic/restic/issues/4287(it also includes the tiny change I proposed in #271)
Checklist
changelog/unreleased/
that describes the changes for our users (template here)gofmt
on the code in all commits