MCPcopy
hub / github.com/syncthing/syncthing / newDefaultCfgWrapper

Function newDefaultCfgWrapper

lib/model/testutils_test.go:91–99  ·  view source on GitHub ↗
(t testing.TB)

Source from the content-addressed store, hash-verified

89}
90
91func newDefaultCfgWrapper(t testing.TB) (config.Wrapper, config.FolderConfiguration) {
92 w, cancel := newConfigWrapperFromContext(t.Context(), defaultCfgWrapper.RawCopy())
93 t.Cleanup(cancel)
94 fcfg := newFolderConfig()
95 _, _ = w.Modify(func(cfg *config.Configuration) {
96 cfg.SetFolder(fcfg)
97 })
98 return w, fcfg
99}
100
101func newConfigWrapperFromContext(ctx context.Context, cfg config.Configuration) (config.Wrapper, context.CancelFunc) {
102 wrapper := config.Wrap("", cfg, myID, events.NoopLogger)

Callers 15

setupModelWithConnectionFunction · 0.85
setupSendReceiveFolderFunction · 0.85
TestRequestFunction · 0.85
TestIssue4573Function · 0.85
TestInternalScanFunction · 0.85
TestIssue5002Function · 0.85
TestParentOfUnignoredFunction · 0.85
TestRequestLimitFunction · 0.85
TestConnCloseOnRestartFunction · 0.85
TestModTimeWindowFunction · 0.85
TestSummaryPausedNoErrorFunction · 0.85
TestFolderAPIErrorsFunction · 0.85

Calls 5

newFolderConfigFunction · 0.85
SetFolderMethod · 0.80
RawCopyMethod · 0.65
ModifyMethod · 0.65

Tested by

no test coverage detected