all: Refactor preparing configuration (#7127)

This commit is contained in:
Simon Frei
2020-11-20 14:21:54 +01:00
committed by GitHub
parent 641b7aee38
commit 24af89c8e2
19 changed files with 207 additions and 147 deletions
+2 -2
View File
@@ -115,7 +115,7 @@ func createTmpWrapper(cfg config.Configuration) config.Wrapper {
if err != nil {
panic(err)
}
wrapper := config.Wrap(tmpFile.Name(), cfg, events.NoopLogger)
wrapper := config.Wrap(tmpFile.Name(), cfg, myID, events.NoopLogger)
tmpFile.Close()
return wrapper
}
@@ -331,7 +331,7 @@ func TestDeviceRename(t *testing.T) {
DeviceID: device1,
},
}
cfg := config.Wrap("testdata/tmpconfig.xml", rawCfg, events.NoopLogger)
cfg := config.Wrap("testdata/tmpconfig.xml", rawCfg, device1, events.NoopLogger)
db := db.NewLowlevel(backend.OpenMemory())
m := newModel(cfg, myID, "syncthing", "dev", db, nil)