Unverified Commit e9519d8a authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Restore Cache.flutterRoot after overriding it in a test (#93555)

Fixes https://github.com/flutter/flutter/issues/93553
parent b810aa71
......@@ -929,7 +929,9 @@ void main() {
});
testUsingContext('AndroidMavenArtifacts can invoke Gradle resolve dependencies if Android SDK is present', () async {
final String oldRoot = Cache.flutterRoot;
Cache.flutterRoot = '';
try {
final AndroidMavenArtifacts mavenArtifacts = AndroidMavenArtifacts(cache, platform: FakePlatform());
expect(await mavenArtifacts.isUpToDate(memoryFileSystem), isFalse);
......@@ -941,6 +943,9 @@ void main() {
expect(await mavenArtifacts.isUpToDate(memoryFileSystem), isFalse);
expect(fakeAndroidSdk.reinitialized, true);
} finally {
Cache.flutterRoot = oldRoot;
}
}, overrides: <Type, Generator>{
Cache: () => cache,
FileSystem: () => memoryFileSystem,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment