MCPcopy
hub / github.com/kopia/kopia / mustGetContentMap

Function mustGetContentMap

cli/command_snapshot_fix_test.go:388–401  ·  view source on GitHub ↗
(t *testing.T, env *testenv.CLITest)

Source from the content-addressed store, hash-verified

386}
387
388func mustGetContentMap(t *testing.T, env *testenv.CLITest) map[content.ID]content.Info {
389 t.Helper()
390
391 var contents1 []content.Info
392
393 testutil.MustParseJSONLines(t, env.RunAndExpectSuccess(t, "content", "ls", "--json"), &contents1)
394
395 contentMap := map[content.ID]content.Info{}
396 for _, v := range contents1 {
397 contentMap[v.ContentID] = v
398 }
399
400 return contentMap
401}
402
403func mustGetFileMap(t *testing.T, env *testenv.CLITest, root object.ID) map[string]*snapshot.DirEntry {
404 t.Helper()

Callers 1

forgetContentsFunction · 0.85

Calls 3

MustParseJSONLinesFunction · 0.92
HelperMethod · 0.80
RunAndExpectSuccessMethod · 0.65

Tested by

no test coverage detected