mirror of
https://github.com/restic/rest-server.git
synced 2025-12-06 17:15:45 -08:00
Refactor handlers: make Config not global
This commit is contained in:
@@ -229,11 +229,11 @@ func TestResticHandler(t *testing.T) {
|
||||
}
|
||||
}()
|
||||
|
||||
// globally set append-only mode and configure path
|
||||
Config.AppendOnly = true
|
||||
Config.Path = tempdir
|
||||
|
||||
mux := NewMux()
|
||||
// set append-only mode and configure path
|
||||
mux := NewHandler(Config{
|
||||
AppendOnly: true,
|
||||
Path: tempdir,
|
||||
})
|
||||
|
||||
// create the repo
|
||||
checkRequest(t, mux.ServeHTTP,
|
||||
|
||||
Reference in New Issue
Block a user