(t *testing.T)
| 115 | } |
| 116 | |
| 117 | func 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…