Check dry run is working
(t *testing.T)
| 47 | |
| 48 | // Check dry run is working |
| 49 | func TestCopyWithDryRun(t *testing.T) { |
| 50 | ctx := context.Background() |
| 51 | ctx, ci := fs.AddConfig(ctx) |
| 52 | r := fstest.NewRun(t) |
| 53 | file1 := r.WriteFile("sub dir/hello world", "hello world", t1) |
| 54 | r.Mkdir(ctx, r.Fremote) |
| 55 | |
| 56 | ci.DryRun = true |
| 57 | ctx = predictDstFromLogger(ctx) |
| 58 | err := CopyDir(ctx, r.Fremote, r.Flocal, false) |
| 59 | testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t) // error expected here because dry-run |
| 60 | require.NoError(t, err) |
| 61 | |
| 62 | r.CheckLocalItems(t, file1) |
| 63 | r.CheckRemoteItems(t) |
| 64 | } |
| 65 | |
| 66 | // Now without dry run |
| 67 | func TestCopy(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…