MCPcopy Index your code
hub / github.com/kopia/kopia / verifyStorageContentList

Function verifyStorageContentList

internal/cache/content_cache_test.go:337–350  ·  view source on GitHub ↗
(t *testing.T, st cache.Storage, expectedContents ...blob.ID)

Source from the content-addressed store, hash-verified

335}
336
337func verifyStorageContentList(t *testing.T, st cache.Storage, expectedContents ...blob.ID) {
338 t.Helper()
339
340 var foundContents []blob.ID
341
342 require.NoError(t, st.ListBlobs(testlogging.Context(t), "", func(bm blob.Metadata) error {
343 foundContents = append(foundContents, bm.BlobID)
344 return nil
345 }))
346
347 slices.Sort(foundContents)
348
349 assert.Equal(t, expectedContents, foundContents, "unexpected content list")
350}
351
352type withoutTouchBlob struct {
353 blob.Storage

Callers 1

verifyContentCacheFunction · 0.85

Calls 4

ContextFunction · 0.92
HelperMethod · 0.80
EqualMethod · 0.80
ListBlobsMethod · 0.65

Tested by

no test coverage detected