lib/model: In tests disable watching for changes by default (fixes #5246) (#5485)

This commit is contained in:
Simon Frei 2019-01-30 16:38:10 +01:00 committed by GitHub
parent 47d68a0aec
commit 7236d56731
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,7 @@ func init() {
defaultFolderConfig = config.NewFolderConfiguration(protocol.LocalDeviceID, "default", "default", fs.FilesystemTypeBasic, "testdata")
defaultFolderConfig.Devices = []config.FolderDeviceConfiguration{{DeviceID: device1}}
defaultFolderConfig.FSWatcherEnabled = false
defaultCfg = config.Configuration{
Version: config.CurrentVersion,
Folders: []config.FolderConfiguration{defaultFolderConfig},

View File

@ -718,6 +718,7 @@ func setupModelWithConnection() (*Model, *fakeConnection, string, *config.Wrappe
cfg := defaultCfgWrapper.RawCopy()
cfg.Devices = append(cfg.Devices, config.NewDeviceConfiguration(device2, "device2"))
cfg.Folders[0] = config.NewFolderConfiguration(protocol.LocalDeviceID, "default", "default", fs.FilesystemTypeBasic, tmpDir)
cfg.Folders[0].FSWatcherEnabled = false
cfg.Folders[0].Devices = []config.FolderDeviceConfiguration{
{DeviceID: device1},
{DeviceID: device2},