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

Function TestMetadataList

cli/context/store/metadata_test.go:76–91  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

74}
75
76func TestMetadataList(t *testing.T) {
77 testee := metadataStore{root: t.TempDir(), config: testCfg}
78 wholeData := []Metadata{
79 testMetadata("context1"),
80 testMetadata("context2"),
81 testMetadata("context3"),
82 }
83
84 for _, s := range wholeData {
85 assert.NilError(t, testee.createOrUpdate(s))
86 }
87
88 data, err := testee.list()
89 assert.NilError(t, err)
90 assert.DeepEqual(t, data, wholeData)
91}
92
93func TestEmptyConfig(t *testing.T) {
94 testee := metadataStore{root: t.TempDir()}

Callers

nothing calls this directly

Calls 3

createOrUpdateMethod · 0.95
listMethod · 0.95
testMetadataFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…