-
Notifications
You must be signed in to change notification settings - Fork 11
Fix: Failing Unit Tests #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* Fixed SQLite storage backend not creating directories necessary, unlike the filestore did prior. * Added initialization error to sqlite for better error handling and parsing. * Readded tests deleted with file store.
The former file store used a pooled connection. The new sqlite storage backend uses one as well now. This enables multithreaded operations on providers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes unit test failures that occurred after migrating from sled to SQLite as the storage backend. The changes address thread safety issues, directory creation problems, and improve error handling for the SQLite storage implementation.
- Migrated SQLite backend to use connection pooling for thread safety
- Added specialized initialization errors and directory creation for SQLite
- Updated test logging configuration to reduce noise from dependencies
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/storage/storage_backend/sqlite_store.rs | Major refactor to use connection pooling, add proper error types, and include tests |
| src/storage/storage_backend/mod.rs | Update error type import and remove manual directory creation from tests |
| src/storage/mod.rs | Switch storage tests to use shared test store configuration |
| src/tests/mod.rs | Improve logging configuration with better error handling and default filters |
| Cargo.toml | Add r2d2 connection pooling dependencies and remove direct rusqlite dependency |
| cSpell.json | Add SQLite-related terms to spell checker dictionary |
This PR addresses regressions stemming from the switch to sqlite from sled.
Added:
Fixed:
Changed:
Checklist:
cargo test -F softwaresoftwaretpm/androidtpm/apple_secure_enclave./ts-typesneeds to be updated?crypto-layer-nodea heads up?node_modules,lib,targetand everything in.gitignore)