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

Function TestEmptyConfig

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

Source from the content-addressed store, hash-verified

91}
92
93func TestEmptyConfig(t *testing.T) {
94 testee := metadataStore{root: t.TempDir()}
95 wholeData := []Metadata{
96 testMetadata("context1"),
97 testMetadata("context2"),
98 testMetadata("context3"),
99 }
100
101 for _, s := range wholeData {
102 assert.NilError(t, testee.createOrUpdate(s))
103 }
104
105 data, err := testee.list()
106 assert.NilError(t, err)
107 assert.Equal(t, len(data), len(wholeData))
108}
109
110type contextWithEmbedding struct {
111 embeddedStruct

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…