MCPcopy
hub / github.com/syncthing/syncthing / setDevice

Function setDevice

lib/model/testutils_test.go:349–358  ·  view source on GitHub ↗
(t testing.TB, w config.Wrapper, device config.DeviceConfiguration)

Source from the content-addressed store, hash-verified

347}
348
349func setDevice(t testing.TB, w config.Wrapper, device config.DeviceConfiguration) {
350 t.Helper()
351 waiter, err := w.Modify(func(cfg *config.Configuration) {
352 cfg.SetDevice(device)
353 })
354 if err != nil {
355 t.Fatal(err)
356 }
357 waiter.Wait()
358}
359
360func addDevice2(t testing.TB, w config.Wrapper, fcfg config.FolderConfiguration) {
361 waiter, err := w.Modify(func(cfg *config.Configuration) {

Callers 2

TestPendingFolderFunction · 0.85

Calls 5

HelperMethod · 0.80
SetDeviceMethod · 0.80
FatalMethod · 0.80
ModifyMethod · 0.65
WaitMethod · 0.65

Tested by

no test coverage detected