MCPcopy
hub / github.com/rclone/rclone / TestError

Function TestError

fs/sync/sync_transform_test.go:499–515  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

497}
498
499func TestError(t *testing.T) {
500 ctx := context.Background()
501 r := fstest.NewRun(t)
502 err := transform.SetOptions(ctx, "all,prefix=ta/c") // has illegal character
503 require.NoError(t, err)
504 file1 := r.WriteFile("toe/toe/toe", "hello world", t1)
505
506 r.Mkdir(ctx, r.Fremote)
507 // ctx = predictDstFromLogger(ctx)
508 err = Sync(ctx, r.Fremote, r.Flocal, true)
509 // testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t)
510 assert.Error(t, err)
511 accounting.GlobalStats().ResetCounters()
512
513 r.CheckLocalListing(t, []fstest.Item{file1}, []string{"toe", "toe/toe"})
514 r.CheckRemoteListing(t, []fstest.Item{file1}, []string{"toe", "toe/toe"})
515}

Callers

nothing calls this directly

Calls 10

WriteFileMethod · 0.95
MkdirMethod · 0.95
CheckLocalListingMethod · 0.95
CheckRemoteListingMethod · 0.95
NewRunFunction · 0.92
SetOptionsFunction · 0.92
GlobalStatsFunction · 0.92
SyncFunction · 0.85
ResetCountersMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…