MCPcopy
hub / github.com/syncthing/syncthing / newState

Function newState

lib/model/model_test.go:44–54  ·  view source on GitHub ↗
(t testing.TB, cfg config.Configuration)

Source from the content-addressed store, hash-verified

42)
43
44func newState(t testing.TB, cfg config.Configuration) (*testModel, context.CancelFunc) {
45 wcfg, cancel := newConfigWrapper(cfg)
46
47 m := setupModel(t, wcfg)
48
49 for _, dev := range cfg.Devices {
50 m.AddConnection(newFakeConnection(dev.DeviceID, m), protocol.Hello{})
51 }
52
53 return m, cancel
54}
55
56func createClusterConfig(remote protocol.DeviceID, ids ...string) *protocol.ClusterConfig {
57 cc := &protocol.ClusterConfig{

Calls 4

newConfigWrapperFunction · 0.85
setupModelFunction · 0.85
newFakeConnectionFunction · 0.85
AddConnectionMethod · 0.65

Tested by

no test coverage detected