mirror of
https://github.com/rclone/rclone.git
synced 2025-08-16 08:38:11 +02:00
httplib: add Close() method to shut the server down and use it in tests
This commit is contained in:
@ -39,11 +39,9 @@ func TestWebDav(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Start the server
|
||||
go func() {
|
||||
w := newWebDAV(fremote, &opt)
|
||||
w.serve()
|
||||
}()
|
||||
// FIXME shut it down somehow?
|
||||
w := newWebDAV(fremote, &opt)
|
||||
go w.serve()
|
||||
defer w.srv.Close()
|
||||
|
||||
// Change directory to run the tests
|
||||
err = os.Chdir("../../../backend/webdav")
|
||||
|
Reference in New Issue
Block a user