MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / TestGetItem

Function TestGetItem

internal/metadata/store_test.go:271–284  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

269}
270
271func TestGetItem(t *testing.T) {
272 ctx := context.Background()
273 s := NewStore(filepath.Join(t.TempDir(), "cam.db"))
274 s.Init(ctx)
275 s.UpsertItem(ctx, Item{Kind: "skill", Name: "test-skill", InstallKey: "a/b:test-skill"})
276
277 item, err := s.GetItem(ctx, "skill", "a/b:test-skill")
278 if err != nil {
279 t.Fatalf("GetItem: %v", err)
280 }
281 if item.Name != "test-skill" {
282 t.Fatalf("unexpected name: %s", item.Name)
283 }
284}
285
286func TestMarkInstalled(t *testing.T) {
287 ctx := context.Background()

Callers

nothing calls this directly

Calls 4

InitMethod · 0.95
UpsertItemMethod · 0.95
GetItemMethod · 0.95
NewStoreFunction · 0.70

Tested by

no test coverage detected