Test copy with depth
(t *testing.T)
| 286 | |
| 287 | // Test copy with depth |
| 288 | func TestCopyWithDepth(t *testing.T) { |
| 289 | ctx := context.Background() |
| 290 | ctx, ci := fs.AddConfig(ctx) |
| 291 | r := fstest.NewRun(t) |
| 292 | file1 := r.WriteFile("sub dir/hello world", "hello world", t1) |
| 293 | file2 := r.WriteFile("hello world2", "hello world2", t2) |
| 294 | |
| 295 | // Check the MaxDepth too |
| 296 | ci.MaxDepth = 1 |
| 297 | |
| 298 | ctx = predictDstFromLogger(ctx) |
| 299 | err := CopyDir(ctx, r.Fremote, r.Flocal, false) |
| 300 | require.NoError(t, err) |
| 301 | testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t) |
| 302 | |
| 303 | r.CheckLocalItems(t, file1, file2) |
| 304 | r.CheckRemoteItems(t, file2) |
| 305 | } |
| 306 | |
| 307 | // Test copy with files from |
| 308 | func testCopyWithFilesFrom(t *testing.T, noTraverse bool) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…