Now without dry run
(t *testing.T)
| 65 | |
| 66 | // Now without dry run |
| 67 | func TestCopy(t *testing.T) { |
| 68 | ctx := context.Background() |
| 69 | r := fstest.NewRun(t) |
| 70 | file1 := r.WriteFile("sub dir/hello world", "hello world", t1) |
| 71 | _, err := operations.SetDirModTime(ctx, r.Flocal, nil, "sub dir", t2) |
| 72 | if err != nil && !errors.Is(err, fs.ErrorNotImplemented) { |
| 73 | require.NoError(t, err) |
| 74 | } |
| 75 | r.Mkdir(ctx, r.Fremote) |
| 76 | |
| 77 | ctx = predictDstFromLogger(ctx) |
| 78 | err = CopyDir(ctx, r.Fremote, r.Flocal, false) |
| 79 | require.NoError(t, err) |
| 80 | testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t) |
| 81 | |
| 82 | r.CheckLocalItems(t, file1) |
| 83 | r.CheckRemoteItems(t, file1) |
| 84 | |
| 85 | // Check that the modtimes of the directories are as expected |
| 86 | r.CheckDirectoryModTimes(t, "sub dir") |
| 87 | } |
| 88 | |
| 89 | func testCopyMetadata(t *testing.T, createEmptySrcDirs bool) { |
| 90 | ctx := context.Background() |
nothing calls this directly
no test coverage detected
searching dependent graphs…