test(flutter): re-enable drift tests after ci-flutter:1.26 ships libsqlite3-0

Drops the libsqlite3-missing skip cohort now that the ci-flutter
runner image installs libsqlite3-0 (CI-runner commit on its main).

Per-file removals (no behavior change in tests themselves — they
just stop being skipped):
- `@Tags(['drift'])` + `library;` directive from 5 files.
- `const _skipDrift = ...;` declaration + its rationale comment
  from 6 files (the 5 above + like_button_test.dart, which had its
  own _skipDrift for the rollback-via-drift case).
- `skip: _skipDrift` annotations from 17 test invocations across
  those 6 files (16 single-line + 1 multi-line in like_button).
- Stale `@Tags(['drift']) tier covers it` reference in
  home_screen_test.dart's drift-coverage comment.

Net -79 +18 lines across 7 files; 17 previously-silent tests are
now part of the CI signal. Fable #399.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-20 18:02:17 -04:00
parent 461c6bf514
commit 85183c455a
7 changed files with 18 additions and 79 deletions
+5 -12
View File
@@ -1,6 +1,3 @@
@Tags(['drift'])
library;
import 'dart:io';
import 'package:dio/dio.dart';
@@ -11,13 +8,10 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:minstrel/cache/audio_cache_manager.dart';
import 'package:minstrel/cache/db.dart';
// See sync_controller_test.dart for the same skip rationale.
const _skipDrift = 'libsqlite3 missing on flutter-ci runner; on-device covers';
AppDb _testDb() => AppDb(NativeDatabase.memory());
void main() {
test('isCached returns false when no row exists', skip: _skipDrift, () async {
test('isCached returns false when no row exists', () async {
final db = _testDb();
addTearDown(db.close);
final mgr = AudioCacheManager(
@@ -29,7 +23,7 @@ void main() {
expect(await mgr.pathFor('nonexistent'), null);
});
test('usageBytes sums sizeBytes across rows', skip: _skipDrift, () async {
test('usageBytes sums sizeBytes across rows', () async {
final db = _testDb();
addTearDown(db.close);
final tmp = Directory.systemTemp.createTempSync();
@@ -55,8 +49,7 @@ void main() {
expect(await mgr.usageBytes(), 350);
});
test('rolling cap evicts non-liked LRU; liked protected',
skip: _skipDrift, () async {
test('rolling cap evicts non-liked LRU; liked protected', () async {
final db = _testDb();
addTearDown(db.close);
final tmp = Directory.systemTemp.createTempSync();
@@ -108,7 +101,7 @@ void main() {
expect(await mgr.isCached('lik'), true); // liked, protected
});
test('clearAll removes everything including manual', skip: _skipDrift, () async {
test('clearAll removes everything including manual', () async {
final db = _testDb();
addTearDown(db.close);
final tmp = Directory.systemTemp.createTempSync();
@@ -133,7 +126,7 @@ void main() {
expect(await mgr.isCached('man'), false);
});
test('unpin removes index row + deletes file', skip: _skipDrift, () async {
test('unpin removes index row + deletes file', () async {
final db = _testDb();
addTearDown(db.close);
final tmp = Directory.systemTemp.createTempSync();