MCPcopy Index your code
hub / github.com/rclone/rclone / TestCopyCheckFirst

Function TestCopyCheckFirst

fs/sync/sync_test.go:249–265  ·  view source on GitHub ↗

Now with --check-first

(t *testing.T)

Source from the content-addressed store, hash-verified

247
248// Now with --check-first
249func TestCopyCheckFirst(t *testing.T) {
250 ctx := context.Background()
251 ctx, ci := fs.AddConfig(ctx)
252 r := fstest.NewRun(t)
253
254 ci.CheckFirst = true
255
256 file1 := r.WriteFile("sub dir/hello world", "hello world", t1)
257
258 ctx = predictDstFromLogger(ctx)
259 err := CopyDir(ctx, r.Fremote, r.Flocal, false)
260 require.NoError(t, err)
261 testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t)
262
263 r.CheckLocalItems(t, file1)
264 r.CheckRemoteItems(t, file1)
265}
266
267// Now with --no-traverse
268func TestSyncNoTraverse(t *testing.T) {

Callers

nothing calls this directly

Calls 9

WriteFileMethod · 0.95
CheckLocalItemsMethod · 0.95
CheckRemoteItemsMethod · 0.95
AddConfigFunction · 0.92
NewRunFunction · 0.92
GetLoggerOptFunction · 0.92
predictDstFromLoggerFunction · 0.85
testLoggerVsLsfFunction · 0.85
CopyDirFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…