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:
+4
-16
@@ -1,6 +1,3 @@
|
||||
@Tags(['drift'])
|
||||
library;
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:drift/native.dart' show NativeDatabase;
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
@@ -11,15 +8,6 @@ import 'package:minstrel/cache/db.dart';
|
||||
import 'package:minstrel/cache/sync_controller.dart';
|
||||
import 'package:minstrel/library/library_providers.dart' show dioProvider;
|
||||
|
||||
// SKIP NOTE (#357 plan B follow-up): drift's NativeDatabase needs the
|
||||
// system libsqlite3.so. The flutter-ci runner image doesn't ship it, so
|
||||
// every test in this file errors with "Failed to load dynamic library
|
||||
// 'libsqlite3.so'". Unblock by either:
|
||||
// (a) adding libsqlite3-dev to the CI-Runner/CI-flutter image, or
|
||||
// (b) using sqlite3/wasm + the wasm executor for VM tests.
|
||||
// Until then, real coverage lives in on-device verification.
|
||||
const _skipDrift = 'libsqlite3 missing on flutter-ci runner; on-device covers';
|
||||
|
||||
/// Builds a Dio whose adapter resolves every request to the supplied
|
||||
/// status code + body. Avoids touching the network in tests.
|
||||
Dio _stubDio({required int status, dynamic body}) {
|
||||
@@ -42,7 +30,7 @@ ProviderContainer _container({required AppDb db, required Dio dio}) {
|
||||
}
|
||||
|
||||
void main() {
|
||||
test('204 advances lastSyncAt without changing cursor', skip: _skipDrift, () async {
|
||||
test('204 advances lastSyncAt without changing cursor', () async {
|
||||
final db = AppDb(NativeDatabase.memory());
|
||||
addTearDown(db.close);
|
||||
|
||||
@@ -56,7 +44,7 @@ void main() {
|
||||
expect(meta?.lastSyncAt, isNotNull);
|
||||
});
|
||||
|
||||
test('200 with artist upsert writes drift row + advances cursor', skip: _skipDrift, () async {
|
||||
test('200 with artist upsert writes drift row + advances cursor', () async {
|
||||
final db = AppDb(NativeDatabase.memory());
|
||||
addTearDown(db.close);
|
||||
|
||||
@@ -85,7 +73,7 @@ void main() {
|
||||
expect(meta?.cursor, 7);
|
||||
});
|
||||
|
||||
test('200 with track delete removes the row', skip: _skipDrift, () async {
|
||||
test('200 with track delete removes the row', () async {
|
||||
final db = AppDb(NativeDatabase.memory());
|
||||
addTearDown(db.close);
|
||||
|
||||
@@ -115,7 +103,7 @@ void main() {
|
||||
expect(track, isNull);
|
||||
});
|
||||
|
||||
test('like_track upsert + delete round-trip', skip: _skipDrift, () async {
|
||||
test('like_track upsert + delete round-trip', () async {
|
||||
final db = AppDb(NativeDatabase.memory());
|
||||
addTearDown(db.close);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user