(t *testing.T)
| 223 | } |
| 224 | |
| 225 | func TestSQLiteStore_Pin_Unpin(t *testing.T) { |
| 226 | db := setupTestDB(t) |
| 227 | store := storage.NewSQLiteStore(db) |
| 228 | ctx := context.Background() |
| 229 | |
| 230 | store.Store(ctx, makeEvent("pin-1", "sentry", "default")) |
| 231 | |
| 232 | if err := store.Pin(ctx, "pin-1"); err != nil { |
| 233 | t.Fatalf("Pin: %v", err) |
| 234 | } |
| 235 | found, _ := store.FindByUUID(ctx, "pin-1") |
| 236 | if !found.IsPinned { |
| 237 | t.Error("expected IsPinned to be true") |
| 238 | } |
| 239 | |
| 240 | if err := store.Unpin(ctx, "pin-1"); err != nil { |
| 241 | t.Fatalf("Unpin: %v", err) |
| 242 | } |
| 243 | found, _ = store.FindByUUID(ctx, "pin-1") |
| 244 | if found.IsPinned { |
| 245 | t.Error("expected IsPinned to be false") |
| 246 | } |
| 247 | } |
nothing calls this directly
no test coverage detected