(testCases testCaseList)
| 263 | } |
| 264 | |
| 265 | func getSyncOptions(testCases testCaseList) Options { |
| 266 | options := Options{ |
| 267 | ExcludePaths: []string{}, |
| 268 | DownloadExcludePaths: []string{}, |
| 269 | UploadExcludePaths: []string{}, |
| 270 | Verbose: true, |
| 271 | Log: log.GetInstance(), |
| 272 | } |
| 273 | |
| 274 | for _, testCase := range testCases { |
| 275 | /* |
| 276 | All paths that should be in these ExcludePaths are marked like this with these strings. |
| 277 | for Example: ignoreFileLocal |
| 278 | The RenameTo... parts of some files contain those, too, but those use Big Letters so they are not excluded. |
| 279 | For example: testFileLocal_RenameToIgnore |
| 280 | */ |
| 281 | if strings.Contains(testCase.path, "ignore") { |
| 282 | options.ExcludePaths = append(options.ExcludePaths, testCase.path) |
| 283 | } else if strings.Contains(testCase.path, "noDownload") { |
| 284 | options.DownloadExcludePaths = append(options.DownloadExcludePaths, testCase.path) |
| 285 | } else if strings.Contains(testCase.path, "noUpload") { |
| 286 | options.UploadExcludePaths = append(options.UploadExcludePaths, testCase.path) |
| 287 | } else if strings.HasSuffix(testCase.path, "_RenameToIgnore") { |
| 288 | options.ExcludePaths = append(options.ExcludePaths, testCase.path+"After") |
| 289 | } else if strings.HasSuffix(testCase.path, "_RenameToNoDownload") { |
| 290 | options.DownloadExcludePaths = append(options.DownloadExcludePaths, testCase.path+"After") |
| 291 | } else if strings.HasSuffix(testCase.path, "_RenameToNoUpload") { |
| 292 | options.UploadExcludePaths = append(options.UploadExcludePaths, testCase.path+"After") |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | return options |
| 297 | } |
| 298 | |
| 299 | func makeBasicTestCases() (testCaseList, testCaseList) { |
| 300 | filesToCheck := testCaseList{ |
no test coverage detected