Skip to content

Commit acc82e6

Browse files
authored
Cleanup datastore import test (#8830)
1 parent a6b467f commit acc82e6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

app/test/shared/datastore_import_test.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@ void main() {
1010
final exceptions = {
1111
// the only valid use
1212
'lib/shared/datastore.dart',
13-
// these should migrated away from using it
14-
'lib/fake/server/fake_dartdoc_service.dart',
15-
'lib/fake/server/fake_analyzer_service.dart',
16-
'lib/fake/tool/init_data_file.dart',
1713
};
1814

1915
test('Only lib/shared/datastore.dart imports gcloud/db.dart', () {
16+
final foundExceptions = <String>{};
2017
final gcloudDatastoreFiles = <String>[];
2118
final gcloudDbFiles = <String>[];
2219
for (final dir in ['bin', 'lib']) {
@@ -28,7 +25,10 @@ void main() {
2825
.toList();
2926

3027
for (final file in files) {
31-
if (exceptions.contains(file.path)) continue;
28+
if (exceptions.contains(file.path)) {
29+
foundExceptions.add(file.path);
30+
continue;
31+
}
3232
final content = file.readAsStringSync();
3333
if (content.contains('package:gcloud/datastore.dart')) {
3434
gcloudDatastoreFiles.add(file.path);
@@ -41,5 +41,6 @@ void main() {
4141

4242
expect(gcloudDatastoreFiles, isEmpty);
4343
expect(gcloudDbFiles, isEmpty);
44+
expect(foundExceptions, exceptions);
4445
});
4546
}

0 commit comments

Comments
 (0)