MCPcopy
hub / github.com/syncthing/syncthing / TestAutoAcceptNewFolder

Function TestAutoAcceptNewFolder

lib/model/model_test.go:1035–1045  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1033}
1034
1035func TestAutoAcceptNewFolder(t *testing.T) {
1036 // New folder
1037 m, cancel := newState(t, defaultAutoAcceptCfg)
1038 defer cleanupModel(m)
1039 defer cancel()
1040 id := srand.String(8)
1041 m.ClusterConfig(device1Conn, createClusterConfig(device1, id))
1042 if fcfg, ok := m.cfg.Folder(id); !ok || !fcfg.SharedWith(device1) {
1043 t.Error("expected shared", id)
1044 }
1045}
1046
1047func TestAutoAcceptNewFolderFromTwoDevices(t *testing.T) {
1048 m, cancel := newState(t, defaultAutoAcceptCfg)

Callers

nothing calls this directly

Calls 8

newStateFunction · 0.85
cleanupModelFunction · 0.85
createClusterConfigFunction · 0.85
SharedWithMethod · 0.80
StringMethod · 0.65
ClusterConfigMethod · 0.65
FolderMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected