MCPcopy
hub / github.com/kopia/kopia / mustListSnapshots

Function mustListSnapshots

cli/command_snapshot_pin_test.go:84–98  ·  view source on GitHub ↗
(t *testing.T, e *testenv.CLITest)

Source from the content-addressed store, hash-verified

82}
83
84func mustListSnapshots(t *testing.T, e *testenv.CLITest) []*snapshot.Manifest {
85 t.Helper()
86
87 var cliSnapshots []cli.SnapshotManifest
88
89 testutil.MustParseJSONLines(t, e.RunAndExpectSuccess(t, "snapshot", "list", "--json"), &cliSnapshots)
90
91 snapshots := make([]*snapshot.Manifest, 0, len(cliSnapshots))
92
93 for _, s := range cliSnapshots {
94 snapshots = append(snapshots, s.Manifest)
95 }
96
97 return snapshot.SortByTime(snapshots, false)
98}

Callers 1

TestSnapshotPinFunction · 0.85

Calls 4

MustParseJSONLinesFunction · 0.92
SortByTimeFunction · 0.92
HelperMethod · 0.80
RunAndExpectSuccessMethod · 0.65

Tested by

no test coverage detected