Function
pauseDevice
(t testing.TB, w config.Wrapper, id protocol.DeviceID, paused bool)
Source from the content-addressed store, hash-verified
| 335 | } |
| 336 | |
| 337 | func pauseDevice(t testing.TB, w config.Wrapper, id protocol.DeviceID, paused bool) { |
| 338 | t.Helper() |
| 339 | waiter, err := w.Modify(func(cfg *config.Configuration) { |
| 340 | _, i, _ := cfg.Device(id) |
| 341 | cfg.Devices[i].Paused = paused |
| 342 | }) |
| 343 | if err != nil { |
| 344 | t.Fatal(err) |
| 345 | } |
| 346 | waiter.Wait() |
| 347 | } |
| 348 | |
| 349 | func setDevice(t testing.TB, w config.Wrapper, device config.DeviceConfiguration) { |
| 350 | t.Helper() |
Tested by
no test coverage detected