Fix Windows CI test failures
Two Windows-specific test failures: 1. TestNewSQLiteStorage - File locking on temp cleanup - Windows couldn't delete temp database file because connection was still open - Added defer store.Close() to properly cleanup the database connection - Without this, Windows file locking prevents TempDir cleanup 2. TestFindAllDatabases - Unexpected nil slice return - FindAllDatabases could return nil instead of empty slice when os.Getwd() fails - Changed from var databases to explicit empty slice initialization - Ensures function always returns non-nil slice, matching test expectations Both issues are more pronounced on Windows due to stricter file locking and different filesystem behavior. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ func TestNewSQLiteStorage(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("NewSQLiteStorage failed: %v", err)
|
||||
}
|
||||
defer store.Close()
|
||||
|
||||
if store == nil {
|
||||
t.Error("expected non-nil storage")
|
||||
|
||||
Reference in New Issue
Block a user