diff --git a/internal/beads/routing_integration_test.go b/internal/beads/routing_integration_test.go index dc0a99c6..45a2d095 100644 --- a/internal/beads/routing_integration_test.go +++ b/internal/beads/routing_integration_test.go @@ -142,7 +142,7 @@ func TestMultiRepoEndToEnd(t *testing.T) { // Initialize database dbPath := filepath.Join(beadsDir, "beads.db") - store, err := sqlite.New(dbPath) + store, err := sqlite.New(context.Background(), dbPath) if err != nil { t.Fatalf("failed to create storage: %v", err) } diff --git a/internal/compact/compactor_test.go b/internal/compact/compactor_test.go index 1376abe1..5cbd2028 100644 --- a/internal/compact/compactor_test.go +++ b/internal/compact/compactor_test.go @@ -17,7 +17,7 @@ func setupTestStorage(t *testing.T) *sqlite.SQLiteStorage { t.Helper() tmpDB := t.TempDir() + "/test.db" - store, err := sqlite.New(tmpDB) + store, err := sqlite.New(context.Background(), tmpDB) if err != nil { t.Fatalf("failed to create storage: %v", err) } diff --git a/internal/daemon/discovery_test.go b/internal/daemon/discovery_test.go index 078375e5..e4ee6b54 100644 --- a/internal/daemon/discovery_test.go +++ b/internal/daemon/discovery_test.go @@ -21,7 +21,7 @@ func TestDiscoverDaemon(t *testing.T) { // Start daemon dbPath := filepath.Join(workspace, "test.db") socketPath := filepath.Join(workspace, "bd.sock") - store, err := sqlite.New(dbPath) + store, err := sqlite.New(context.Background(), dbPath) if err != nil { t.Fatalf("failed to create storage: %v", err) } @@ -59,7 +59,7 @@ func TestFindDaemonByWorkspace(t *testing.T) { // Start daemon dbPath := filepath.Join(workspace, "test.db") socketPath := filepath.Join(workspace, "bd.sock") - store, err := sqlite.New(dbPath) + store, err := sqlite.New(context.Background(), dbPath) if err != nil { t.Fatalf("failed to create storage: %v", err) } @@ -232,7 +232,7 @@ func TestDiscoverDaemons_Legacy(t *testing.T) { // Start a test daemon dbPath := filepath.Join(beadsDir, "test.db") socketPath := filepath.Join(beadsDir, "bd.sock") - store, err := sqlite.New(dbPath) + store, err := sqlite.New(context.Background(), dbPath) if err != nil { t.Fatalf("failed to create storage: %v", err) } diff --git a/internal/importer/importer_integration_test.go b/internal/importer/importer_integration_test.go index cbac9c0b..a21ab26a 100644 --- a/internal/importer/importer_integration_test.go +++ b/internal/importer/importer_integration_test.go @@ -16,7 +16,7 @@ import ( // TestConcurrentExternalRefUpdates tests concurrent updates to same external_ref with different timestamps // This is a slow integration test that verifies no deadlocks occur func TestConcurrentExternalRefUpdates(t *testing.T) { - store, err := sqlite.New(":memory:") + store, err := sqlite.New(context.Background(), ":memory:") if err != nil { t.Fatalf("Failed to create store: %v", err) } diff --git a/internal/rpc/bench_test.go b/internal/rpc/bench_test.go index f89e419a..03f516d7 100644 --- a/internal/rpc/bench_test.go +++ b/internal/rpc/bench_test.go @@ -24,7 +24,7 @@ func BenchmarkDirectCreate(b *testing.B) { defer os.RemoveAll(tmpDir) dbPath := filepath.Join(tmpDir, "test.db") - store, err := sqlitestorage.New(dbPath) + store, err := sqlitestorage.New(context.Background(), dbPath) if err != nil { b.Fatalf("Failed to create store: %v", err) } @@ -75,7 +75,7 @@ func BenchmarkDirectUpdate(b *testing.B) { defer os.RemoveAll(tmpDir) dbPath := filepath.Join(tmpDir, "test.db") - store, err := sqlitestorage.New(dbPath) + store, err := sqlitestorage.New(context.Background(), dbPath) if err != nil { b.Fatalf("Failed to create store: %v", err) } @@ -149,7 +149,7 @@ func BenchmarkDirectList(b *testing.B) { defer os.RemoveAll(tmpDir) dbPath := filepath.Join(tmpDir, "test.db") - store, err := sqlitestorage.New(dbPath) + store, err := sqlitestorage.New(context.Background(), dbPath) if err != nil { b.Fatalf("Failed to create store: %v", err) } @@ -279,7 +279,7 @@ func setupBenchServer(b *testing.B) (*Server, *Client, func(), string) { dbPath := filepath.Join(beadsDir, "test.db") socketPath := filepath.Join(beadsDir, "bd.sock") - store, err := sqlitestorage.New(dbPath) + store, err := sqlitestorage.New(context.Background(), dbPath) if err != nil { os.RemoveAll(tmpDir) b.Fatalf("Failed to create store: %v", err) diff --git a/internal/rpc/version_test.go b/internal/rpc/version_test.go index 17e6aad1..c90f43af 100644 --- a/internal/rpc/version_test.go +++ b/internal/rpc/version_test.go @@ -180,7 +180,7 @@ func TestHealthCheckIncludesVersionInfo(t *testing.T) { tmpDir, _, dbPath, socketPath, cleanup := setupTestServerIsolated(t) defer cleanup() - store, err := sqlitestorage.New(dbPath) + store, err := sqlitestorage.New(context.Background(), dbPath) if err != nil { t.Fatalf("Failed to create store: %v", err) } @@ -244,7 +244,7 @@ func TestIncompatibleVersionInHealth(t *testing.T) { tmpDir, _, dbPath, socketPath, cleanup := setupTestServerIsolated(t) defer cleanup() - store, err := sqlitestorage.New(dbPath) + store, err := sqlitestorage.New(context.Background(), dbPath) if err != nil { t.Fatalf("Failed to create store: %v", err) } @@ -364,7 +364,7 @@ func TestPingAndHealthBypassVersionCheck(t *testing.T) { tmpDir, _, dbPath, socketPath, cleanup := setupTestServerIsolated(t) defer cleanup() - store, err := sqlitestorage.New(dbPath) + store, err := sqlitestorage.New(context.Background(), dbPath) if err != nil { t.Fatalf("Failed to create store: %v", err) } @@ -439,7 +439,7 @@ func TestMetricsOperation(t *testing.T) { tmpDir, _, dbPath, socketPath, cleanup := setupTestServerIsolated(t) defer cleanup() - store, err := sqlitestorage.New(dbPath) + store, err := sqlitestorage.New(context.Background(), dbPath) if err != nil { t.Fatalf("Failed to create store: %v", err) } diff --git a/internal/testutil/fixtures/fixtures_test.go b/internal/testutil/fixtures/fixtures_test.go index 482443df..156c5778 100644 --- a/internal/testutil/fixtures/fixtures_test.go +++ b/internal/testutil/fixtures/fixtures_test.go @@ -13,7 +13,7 @@ import ( func TestLargeSQLite(t *testing.T) { tmpDB := t.TempDir() + "/test.db" - store, err := sqlite.New(tmpDB) + store, err := sqlite.New(context.Background(), tmpDB) if err != nil { t.Fatalf("Failed to create storage: %v", err) } @@ -66,7 +66,7 @@ func TestXLargeSQLite(t *testing.T) { } tmpDB := t.TempDir() + "/test.db" - store, err := sqlite.New(tmpDB) + store, err := sqlite.New(context.Background(), tmpDB) if err != nil { t.Fatalf("Failed to create storage: %v", err) } @@ -100,7 +100,7 @@ func TestLargeFromJSONL(t *testing.T) { } tmpDB := t.TempDir() + "/test.db" - store, err := sqlite.New(tmpDB) + store, err := sqlite.New(context.Background(), tmpDB) if err != nil { t.Fatalf("Failed to create storage: %v", err) }