1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-15 15:53:41 +00:00

serve http, webdav, restic: ensure rclone exits if the port is in use

This commit is contained in:
Nick Craig-Wood
2018-11-01 17:16:31 +00:00
parent 1f05d5bf4a
commit bb5637d46a
7 changed files with 65 additions and 40 deletions

View File

@@ -48,8 +48,11 @@ func TestWebDav(t *testing.T) {
// Start the server
w := newWebDAV(fremote, &opt)
go w.serve()
defer w.srv.Close()
assert.NoError(t, w.serve())
defer func() {
w.Close()
w.Wait()
}()
// Change directory to run the tests
err = os.Chdir("../../../backend/webdav")