MCPcopy
hub / github.com/kopia/kopia / mustListDirEntries

Function mustListDirEntries

cli/command_snapshot_fix_test.go:412–426  ·  view source on GitHub ↗
(t *testing.T, env *testenv.CLITest, out map[string]*snapshot.DirEntry, root object.ID, prefix string)

Source from the content-addressed store, hash-verified

410}
411
412func mustListDirEntries(t *testing.T, env *testenv.CLITest, out map[string]*snapshot.DirEntry, root object.ID, prefix string) {
413 t.Helper()
414
415 var dir1 snapshot.DirManifest
416
417 testutil.MustParseJSONLines(t, env.RunAndExpectSuccess(t, "show", root.String()), &dir1)
418
419 for _, v := range dir1.Entries {
420 out[prefix+v.Name] = v
421
422 if v.Type == snapshot.EntryTypeDirectory {
423 mustListDirEntries(t, env, out, v.ObjectID, prefix+v.Name+"/")
424 }
425 }
426}
427
428func mustWriteFileWithRepeatedData(t *testing.T, fname string, repeat int, data []byte) {
429 t.Helper()

Callers 1

mustGetFileMapFunction · 0.85

Calls 4

MustParseJSONLinesFunction · 0.92
HelperMethod · 0.80
RunAndExpectSuccessMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected