From a734693ff51860a9b9a3b834cadd492a09ed0c5e Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 22 Jun 2020 17:04:17 -0700 Subject: [PATCH] [flutter_tools] cleanup iOS test (#59999) The test needs to look up HOME, but one wasn't provided. This would end up using the real home directory, crashing on windows --- .../test/general.shard/ios/simulators_test.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/test/general.shard/ios/simulators_test.dart b/packages/flutter_tools/test/general.shard/ios/simulators_test.dart index 5457678539..71dafd946b 100644 --- a/packages/flutter_tools/test/general.shard/ios/simulators_test.dart +++ b/packages/flutter_tools/test/general.shard/ios/simulators_test.dart @@ -47,7 +47,7 @@ void main() { environment: {}, operatingSystem: 'macos', ); - fileSystem = MemoryFileSystem(); + fileSystem = MemoryFileSystem.test(); fsUtils = FileSystemUtils(fileSystem: fileSystem, platform: osx); }); @@ -458,6 +458,12 @@ void main() { overrides: { ProcessManager: () => mockProcessManager, FileSystem: () => fileSystem, + Platform: () => FakePlatform( + operatingSystem: 'macos', + environment: { + 'HOME': '/' + }, + ), }); testUsingContext('unified logging with app name', () async {