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

Function TestWithEmbedding

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

Source from the content-addressed store, hash-verified

115}
116
117func TestWithEmbedding(t *testing.T) {
118 testee := metadataStore{
119 root: t.TempDir(),
120 config: NewConfig(func() any { return &contextWithEmbedding{} }),
121 }
122 testCtxMeta := contextWithEmbedding{
123 embeddedStruct: embeddedStruct{
124 Val: "Hello",
125 },
126 }
127 assert.NilError(t, testee.createOrUpdate(Metadata{Metadata: testCtxMeta, Name: "test"}))
128 res, err := testee.get("test")
129 assert.NilError(t, err)
130 assert.Equal(t, testCtxMeta, res.Metadata)
131}

Callers

nothing calls this directly

Calls 3

createOrUpdateMethod · 0.95
getMethod · 0.95
NewConfigFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…