(t *testing.T)
| 1045 | } |
| 1046 | |
| 1047 | func TestAutoAcceptNewFolderFromTwoDevices(t *testing.T) { |
| 1048 | m, cancel := newState(t, defaultAutoAcceptCfg) |
| 1049 | defer cleanupModel(m) |
| 1050 | defer cancel() |
| 1051 | id := srand.String(8) |
| 1052 | defer os.RemoveAll(id) |
| 1053 | m.ClusterConfig(device1Conn, createClusterConfig(device1, id)) |
| 1054 | if fcfg, ok := m.cfg.Folder(id); !ok || !fcfg.SharedWith(device1) { |
| 1055 | t.Error("expected shared", id) |
| 1056 | } |
| 1057 | if fcfg, ok := m.cfg.Folder(id); !ok || fcfg.SharedWith(device2) { |
| 1058 | t.Error("unexpected expected shared", id) |
| 1059 | } |
| 1060 | m.ClusterConfig(device2Conn, createClusterConfig(device2, id)) |
| 1061 | if fcfg, ok := m.cfg.Folder(id); !ok || !fcfg.SharedWith(device2) { |
| 1062 | t.Error("expected shared", id) |
| 1063 | } |
| 1064 | } |
| 1065 | |
| 1066 | func TestAutoAcceptNewFolderFromOnlyOneDevice(t *testing.T) { |
| 1067 | modifiedCfg := defaultAutoAcceptCfg.Copy() |
nothing calls this directly
no test coverage detected