(t *testing.T)
| 2825 | } |
| 2826 | |
| 2827 | func TestIssue4903(t *testing.T) { |
| 2828 | wrapper, cancel := newConfigWrapper(config.Configuration{Version: config.CurrentVersion}) |
| 2829 | defer cancel() |
| 2830 | m := setupModel(t, wrapper) |
| 2831 | defer cleanupModel(m) |
| 2832 | |
| 2833 | // Force the model to wire itself and add the folders |
| 2834 | folderPath := "nonexistent" |
| 2835 | cfg := defaultCfgWrapper.RawCopy() |
| 2836 | fcfg := config.FolderConfiguration{ |
| 2837 | ID: "folder1", |
| 2838 | Path: folderPath, |
| 2839 | FilesystemType: config.FilesystemTypeBasic, |
| 2840 | Paused: true, |
| 2841 | Devices: []config.FolderDeviceConfiguration{ |
| 2842 | {DeviceID: device1}, |
| 2843 | }, |
| 2844 | } |
| 2845 | cfg.Folders = []config.FolderConfiguration{fcfg} |
| 2846 | replace(t, wrapper, cfg) |
| 2847 | |
| 2848 | if err := fcfg.CheckPath(); err != config.ErrPathMissing { |
| 2849 | t.Fatalf("expected path missing error, got: %v, debug: %s", err, fcfg.CheckPath()) |
| 2850 | } |
| 2851 | |
| 2852 | if _, err := fcfg.Filesystem().Lstat("."); !fs.IsNotExist(err) { |
| 2853 | t.Fatalf("Expected missing path error, got: %v", err) |
| 2854 | } |
| 2855 | } |
| 2856 | |
| 2857 | func TestIssue5002(t *testing.T) { |
| 2858 | // recheckFile should not panic when given an index equal to the number of blocks |
nothing calls this directly
no test coverage detected