(fs fs.Filesystem, path string, myID protocol.DeviceID)
| 1366 | } |
| 1367 | |
| 1368 | func copyAndLoad(fs fs.Filesystem, path string, myID protocol.DeviceID) (*testWrapper, func(), error) { |
| 1369 | temp, err := copyToTmp(fs, path) |
| 1370 | if err != nil { |
| 1371 | return nil, func() {}, err |
| 1372 | } |
| 1373 | wrapper, err := loadTest(fs, temp, myID) |
| 1374 | if err != nil { |
| 1375 | return nil, func() {}, err |
| 1376 | } |
| 1377 | return wrapper, func() { |
| 1378 | fs.Remove(temp) |
| 1379 | wrapper.stop() |
| 1380 | }, nil |
| 1381 | } |
| 1382 | |
| 1383 | func loadTest(fs fs.Filesystem, path string, myID protocol.DeviceID) (*testWrapper, error) { |
| 1384 | cfg, _, err := loadWrapTest(fs, path, myID, events.NoopLogger) |
no test coverage detected