MCPcopy
hub / github.com/google/ax / TestSQLiteEventLog_Empty

Function TestSQLiteEventLog_Empty

internal/controller/executor/sqlite_test.go:142–160  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

140}
141
142func 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
162func TestSQLiteEventLog_DeleteEvents(t *testing.T) {
163 ctx := context.Background()

Callers

nothing calls this directly

Calls 3

OpenSQLiteEventLogFunction · 0.85
CloseMethod · 0.65
EventsMethod · 0.65

Tested by

no test coverage detected