(t *testing.T)
| 140 | } |
| 141 | |
| 142 | func TestSQLiteEventLog_Empty(t *testing.T) { |
| 143 | ctx := context.Background() |
| 144 | dbPath := filepath.Join(t.TempDir(), "test.db") |
| 145 | |
| 146 | log, err := OpenSQLiteEventLog(dbPath) |
| 147 | if err != nil { |
| 148 | t.Fatalf("failed to open sqlite event log: %v", err) |
| 149 | } |
| 150 | defer log.Close() |
| 151 | |
| 152 | events, err := log.Events(ctx, "conv-1") |
| 153 | if err != nil { |
| 154 | t.Fatalf("failed to read events: %v", err) |
| 155 | } |
| 156 | |
| 157 | if len(events) != 0 { |
| 158 | t.Fatalf("expected 0 events, got %d", len(events)) |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | func TestSQLiteEventLog_DeleteEvents(t *testing.T) { |
| 163 | ctx := context.Background() |
nothing calls this directly
no test coverage detected