Pin the version of flutter/plugins to test against (#71166)
This commit is contained in:
@@ -4,7 +4,10 @@
|
||||
|
||||
import 'dart:io' hide Platform;
|
||||
|
||||
import 'package:file/file.dart' as fs;
|
||||
import 'package:file/memory.dart';
|
||||
import 'package:mockito/mockito.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
import '../test.dart';
|
||||
import 'common.dart';
|
||||
@@ -56,4 +59,25 @@ void main() {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
group('flutter/plugins version', () {
|
||||
final MemoryFileSystem memoryFileSystem = MemoryFileSystem();
|
||||
final fs.File pluginsVersionFile = memoryFileSystem.file(path.join('bin','internal','flutter_plugins.version'));
|
||||
const String kSampleHash = '592b5b27431689336fa4c721a099eedf787aeb56';
|
||||
setUpAll(() {
|
||||
pluginsVersionFile.createSync(recursive: true);
|
||||
});
|
||||
|
||||
test('commit hash', () async {
|
||||
pluginsVersionFile.writeAsStringSync(kSampleHash);
|
||||
final String actualHash = await getFlutterPluginsVersion(fileSystem: memoryFileSystem, pluginsVersionFile: pluginsVersionFile.path);
|
||||
expect(actualHash, kSampleHash);
|
||||
});
|
||||
|
||||
test('commit hash with newlines', () async {
|
||||
pluginsVersionFile.writeAsStringSync('\n$kSampleHash\n');
|
||||
final String actualHash = await getFlutterPluginsVersion(fileSystem: memoryFileSystem, pluginsVersionFile: pluginsVersionFile.path);
|
||||
expect(actualHash, kSampleHash);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user