Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flutter_tools] even more test fixes #60156

Merged
merged 2 commits into from
Jun 24, 2020

Conversation

jonahwilliams
Copy link
Member

Description

Fix tests broken under tester

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jun 24, 2020
@@ -25,6 +26,8 @@ void main() {
final List<Device> devices = <Device>[device1, device2, device3];
final DeviceManager deviceManager = TestDeviceManager(devices);
expect(await deviceManager.getDevices(), devices);
}, overrides: <Type, Generator>{
Artifacts: () => Artifacts.test(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hitting real artifacts, failing if they did not exist

@@ -791,28 +792,36 @@ void main() {
});

testUsingContext('Correct flutter runner', () async {
expect(globals.artifacts.getArtifactPath(
final MockCache cache = MockCache();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hitting real cache, failing if it didn't exist.

});

testUsingContext('Does not hot restart when device does not support it', () async {
fileSystem.file(globalPackagesPath)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hitting real file system, failing if a .packages didn't exist

@@ -52,7 +51,6 @@ void main() {

String podsIsInCustomDir({String cocoapodsReposDir}) {
cocoapodsReposDir ??= fileSystem.path.join(
globals.fsUtils.homeDirPath,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test apparently doesn't rely on this value, avoid looking up potentially null home dir path

@@ -43,7 +43,9 @@ void main() {
MockHttpServer mockHttpServer;

setUpAll(() async {
packages = await loadPackageConfigUri(Uri.base.resolve('.packages'));
packages = PackageConfig(<Package>[
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails if .packages doesn't exist

@jonahwilliams jonahwilliams merged commit 5d61bff into flutter:master Jun 24, 2020
@jonahwilliams jonahwilliams deleted the even_more_tester_work branch June 24, 2020 17:24
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants