fix: Add context.Background() to sqlite.New() calls in test files
Multiple test files were still using the old sqlite.New(path) signature instead of the new sqlite.New(ctx, path) signature. This was causing compilation failures in the test suite. Fixed files: - internal/importer/importer_test.go - internal/importer/external_ref_test.go - internal/importer/timestamp_test.go - internal/rpc/limits_test.go - internal/rpc/list_filters_test.go - internal/rpc/rpc_test.go - internal/rpc/status_test.go - internal/syncbranch/syncbranch_test.go
This commit is contained in:
@@ -22,7 +22,7 @@ func TestImportWithExternalRef(t *testing.T) {
|
||||
dbPath := filepath.Join(tmpDir, "test.db")
|
||||
|
||||
// Create database
|
||||
store, err := sqlite.New(dbPath)
|
||||
store, err := sqlite.New(context.Background(), dbPath)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create database: %v", err)
|
||||
}
|
||||
@@ -106,7 +106,7 @@ func TestImportWithExternalRefDifferentID(t *testing.T) {
|
||||
dbPath := filepath.Join(tmpDir, "test.db")
|
||||
|
||||
// Create database
|
||||
store, err := sqlite.New(dbPath)
|
||||
store, err := sqlite.New(context.Background(), dbPath)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create database: %v", err)
|
||||
}
|
||||
@@ -197,7 +197,7 @@ func TestImportLocalIssueNotOverwrittenByExternalRef(t *testing.T) {
|
||||
dbPath := filepath.Join(tmpDir, "test.db")
|
||||
|
||||
// Create database
|
||||
store, err := sqlite.New(dbPath)
|
||||
store, err := sqlite.New(context.Background(), dbPath)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create database: %v", err)
|
||||
}
|
||||
@@ -295,7 +295,7 @@ func TestImportExternalRefTimestampCheck(t *testing.T) {
|
||||
dbPath := filepath.Join(tmpDir, "test.db")
|
||||
|
||||
// Create database
|
||||
store, err := sqlite.New(dbPath)
|
||||
store, err := sqlite.New(context.Background(), dbPath)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create database: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user