MCPcopy
hub / github.com/kopia/kopia / ListSnapshotsAndExpectSuccess

Function ListSnapshotsAndExpectSuccess

tests/clitestutil/clitestutil.go:137–143  ·  view source on GitHub ↗

ListSnapshotsAndExpectSuccess lists given snapshots and parses the output.

(tb testing.TB, e testEnv, targets ...string)

Source from the content-addressed store, hash-verified

135
136// ListSnapshotsAndExpectSuccess lists given snapshots and parses the output.
137func ListSnapshotsAndExpectSuccess(tb testing.TB, e testEnv, targets ...string) []SourceInfo {
138 tb.Helper()
139
140 lines := e.RunAndExpectSuccess(tb, append([]string{"snapshot", "list", "-l", "--manifest-id"}, targets...)...)
141
142 return MustParseSnapshots(tb, lines)
143}
144
145// ListDirectory lists a given directory and returns directory entries.
146func ListDirectory(tb testing.TB, e testEnv, targets ...string) []DirEntry {

Callers 15

testAPIServerRepositoryFunction · 0.92
TestRestoreCommandFunction · 0.92
TestSnapshotRestoreFunction · 0.92
testSnapshotDeleteFunction · 0.92
TestDiffFunction · 0.92
TestShallowrestoreFunction · 0.92

Calls 3

MustParseSnapshotsFunction · 0.85
HelperMethod · 0.80
RunAndExpectSuccessMethod · 0.65

Tested by 15

testAPIServerRepositoryFunction · 0.74
TestRestoreCommandFunction · 0.74
TestSnapshotRestoreFunction · 0.74
testSnapshotDeleteFunction · 0.74
TestDiffFunction · 0.74
TestShallowrestoreFunction · 0.74