MCPcopy
hub / github.com/syncthing/syncthing / addFakeConn

Function addFakeConn

lib/model/fakeconns_test.go:160–178  ·  view source on GitHub ↗
(m *testModel, dev protocol.DeviceID, folderID string)

Source from the content-addressed store, hash-verified

158}
159
160func addFakeConn(m *testModel, dev protocol.DeviceID, folderID string) *fakeConnection {
161 fc := newFakeConnection(dev, m)
162 fc.folder = folderID
163 m.AddConnection(fc, protocol.Hello{})
164
165 m.ClusterConfig(fc, &protocol.ClusterConfig{
166 Folders: []protocol.Folder{
167 {
168 ID: folderID,
169 Devices: []protocol.Device{
170 {ID: myID},
171 {ID: dev},
172 },
173 },
174 },
175 })
176
177 return fc
178}

Calls 3

newFakeConnectionFunction · 0.85
AddConnectionMethod · 0.65
ClusterConfigMethod · 0.65

Tested by

no test coverage detected