MCPcopy Create free account
hub / github.com/buggregator/server / TestSQLiteStore_Delete

Function TestSQLiteStore_Delete

internal/storage/sqlite_test.go:163–179  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

161}
162
163func TestSQLiteStore_Delete(t *testing.T) {
164 db := setupTestDB(t)
165 store := storage.NewSQLiteStore(db)
166 ctx := context.Background()
167
168 ev := makeEvent("del-1", "sentry", "default")
169 store.Store(ctx, ev)
170
171 if err := store.Delete(ctx, "del-1"); err != nil {
172 t.Fatalf("Delete: %v", err)
173 }
174
175 found, _ := store.FindByUUID(ctx, "del-1")
176 if found != nil {
177 t.Error("expected event to be deleted")
178 }
179}
180
181func TestSQLiteStore_DeleteAll(t *testing.T) {
182 db := setupTestDB(t)

Callers

nothing calls this directly

Calls 6

StoreMethod · 0.95
DeleteMethod · 0.95
FindByUUIDMethod · 0.95
NewSQLiteStoreFunction · 0.92
makeEventFunction · 0.85
setupTestDBFunction · 0.70

Tested by

no test coverage detected