MCPcopy
hub / github.com/rclone/rclone / TestCopyMissingDirectory

Function TestCopyMissingDirectory

fs/sync/sync_test.go:184–198  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

182}
183
184func TestCopyMissingDirectory(t *testing.T) {
185 ctx := context.Background()
186 r := fstest.NewRun(t)
187 r.Mkdir(ctx, r.Fremote)
188
189 nonExistingFs, err := fs.NewFs(ctx, "/non-existing")
190 if err != nil {
191 t.Fatal(err)
192 }
193
194 ctx = predictDstFromLogger(ctx)
195 err = CopyDir(ctx, r.Fremote, nonExistingFs, false)
196 require.Error(t, err)
197 testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t)
198}
199
200// Now with --no-traverse
201func TestCopyNoTraverse(t *testing.T) {

Callers

nothing calls this directly

Calls 9

MkdirMethod · 0.95
NewRunFunction · 0.92
NewFsFunction · 0.92
GetLoggerOptFunction · 0.92
predictDstFromLoggerFunction · 0.85
testLoggerVsLsfFunction · 0.85
CopyDirFunction · 0.70
FatalMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…