all: Refactor preparing configuration (#7127)
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
"github.com/syncthing/syncthing/lib/config"
|
||||
"github.com/syncthing/syncthing/lib/events"
|
||||
"github.com/syncthing/syncthing/lib/protocol"
|
||||
)
|
||||
|
||||
func TestIsLANHost(t *testing.T) {
|
||||
@@ -36,7 +37,7 @@ func TestIsLANHost(t *testing.T) {
|
||||
Options: config.OptionsConfiguration{
|
||||
AlwaysLocalNets: []string{"10.20.30.0/24"},
|
||||
},
|
||||
}, events.NoopLogger)
|
||||
}, protocol.LocalDeviceID, events.NoopLogger)
|
||||
s := &service{cfg: cfg}
|
||||
|
||||
for _, tc := range cases {
|
||||
|
||||
@@ -30,7 +30,7 @@ func init() {
|
||||
}
|
||||
|
||||
func initConfig() config.Wrapper {
|
||||
cfg := config.Wrap("/dev/null", config.New(device1), events.NoopLogger)
|
||||
cfg := config.Wrap("/dev/null", config.New(device1), device1, events.NoopLogger)
|
||||
dev1Conf = config.NewDeviceConfiguration(device1, "device1")
|
||||
dev2Conf = config.NewDeviceConfiguration(device2, "device2")
|
||||
dev3Conf = config.NewDeviceConfiguration(device3, "device3")
|
||||
|
||||
Reference in New Issue
Block a user