test: cover _resolveDatabasePath retry logic (#167) (#187)

This commit was merged in pull request #187.
This commit is contained in:
Bot of Thomas Güttler
2026-05-23 18:35:15 +02:00
parent 3019fdf145
commit 11d9805fca
2 changed files with 97 additions and 0 deletions
+5
View File
@@ -616,6 +616,11 @@ Future<String> _resolveDatabasePath() async {
);
}
// These two functions are only called from unit tests (database_path_test.dart).
// They expose internals that cannot be reached via the public API.
Future<String> resolveDatabasePathForTesting() => _resolveDatabasePath();
void resetDatabasePathForTesting() => _dbPath = null;
LazyDatabase _openConnection() {
return LazyDatabase(() async {
final file = File(await _resolveDatabasePath());