(t *testing.T)
| 1196 | } |
| 1197 | |
| 1198 | func TestAutoAcceptAlreadyShared(t *testing.T) { |
| 1199 | // Already shared |
| 1200 | id := srand.String(8) |
| 1201 | tcfg := defaultAutoAcceptCfg.Copy() |
| 1202 | tcfg.Folders = []config.FolderConfiguration{ |
| 1203 | { |
| 1204 | FilesystemType: config.FilesystemTypeFake, |
| 1205 | ID: id, |
| 1206 | Path: id, |
| 1207 | Devices: []config.FolderDeviceConfiguration{ |
| 1208 | { |
| 1209 | DeviceID: device1, |
| 1210 | }, |
| 1211 | }, |
| 1212 | }, |
| 1213 | } |
| 1214 | m, cancel := newState(t, tcfg) |
| 1215 | defer cleanupModel(m) |
| 1216 | defer cancel() |
| 1217 | if fcfg, ok := m.cfg.Folder(id); !ok || !fcfg.SharedWith(device1) { |
| 1218 | t.Error("missing folder, or not shared", id) |
| 1219 | } |
| 1220 | m.ClusterConfig(device1Conn, createClusterConfig(device1, id)) |
| 1221 | |
| 1222 | if fcfg, ok := m.cfg.Folder(id); !ok || !fcfg.SharedWith(device1) { |
| 1223 | t.Error("missing folder, or not shared", id) |
| 1224 | } |
| 1225 | } |
| 1226 | |
| 1227 | func TestAutoAcceptNameConflict(t *testing.T) { |
| 1228 | ffs := fs.NewFilesystem(fs.FilesystemTypeFake, srand.String(32)) |
nothing calls this directly
no test coverage detected