MCPcopy
hub / github.com/syncthing/syncthing / pauseFolder

Function pauseFolder

lib/model/testutils_test.go:314–324  ·  view source on GitHub ↗
(t testing.TB, w config.Wrapper, id string, paused bool)

Source from the content-addressed store, hash-verified

312}
313
314func pauseFolder(t testing.TB, w config.Wrapper, id string, paused bool) {
315 t.Helper()
316 waiter, err := w.Modify(func(cfg *config.Configuration) {
317 _, i, _ := cfg.Folder(id)
318 cfg.Folders[i].Paused = paused
319 })
320 if err != nil {
321 t.Fatal(err)
322 }
323 waiter.Wait()
324}
325
326func setFolder(t testing.TB, w config.Wrapper, fcfg config.FolderConfiguration) {
327 t.Helper()

Callers 6

TestSummaryPausedNoErrorFunction · 0.85
TestFolderAPIErrorsFunction · 0.85
TestIssue6961Function · 0.85

Calls 5

HelperMethod · 0.80
FatalMethod · 0.80
ModifyMethod · 0.65
FolderMethod · 0.65
WaitMethod · 0.65

Tested by

no test coverage detected