MCPcopy Create free account
hub / github.com/docker/cli / TestStoreGetList

Function TestStoreGetList

cli/manifest/store/store_test.go:103–114  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

101})
102
103func TestStoreGetList(t *testing.T) {
104 store := NewStore(t.TempDir())
105 listRef := ref("list")
106 first := types.ImageManifest{Ref: sref(t, "first")}
107 assert.NilError(t, store.Save(listRef, ref("first"), first))
108 second := types.ImageManifest{Ref: sref(t, "second")}
109 assert.NilError(t, store.Save(listRef, ref("exists"), second))
110
111 list, err := store.GetList(listRef)
112 assert.NilError(t, err)
113 assert.Check(t, is.Len(list, 2))
114}
115
116func TestStoreGetListDoesNotExist(t *testing.T) {
117 store := NewStore(t.TempDir())

Callers

nothing calls this directly

Calls 6

SaveMethod · 0.95
GetListMethod · 0.95
NewStoreFunction · 0.85
srefFunction · 0.85
refFunction · 0.70
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…