This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[flutter_plugin_tool] Add more failure test coverage #4132
Merged
stuartmorgan-g
merged 1 commit into
flutter:master
from
stuartmorgan-g:fix-early-tool-exits
Jul 2, 2021
Merged
[flutter_plugin_tool] Add more failure test coverage #4132
stuartmorgan-g
merged 1 commit into
flutter:master
from
stuartmorgan-g:fix-early-tool-exits
Jul 2, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Many commands had insufficient failure testing. This adds new tests that ensure that for every Process call, at least one test fails if a failure from that process were ignored (with the exception of calls in the `publish` command, which has a custom process mocking system, so was out of scope here; it already has more coverage than most tests did though.) For a few existing failure tests, adds output checks to ensure that they are testing for the *right* failures. Other changes: - Adds convenience constructors to MockProcess for the common cases of a mock process that just exits with a 0 or 1 status, to reduce test verbosity. - Fixes a few bugs that were found by the new tests. - Minor test cleanup, especially cases where a mock process was being set up just to make all calls succeed, which is the default as of recent changes.
This is a follow-up to try to more comprehensively fix the issue I found specific instances of yesterday. |
stuartmorgan-g
commented
Jul 2, 2021
}); | ||
|
||
test('building for iOS when plugin is not set up for iOS results in no-op', | ||
() async { | ||
createFakePlugin('plugin', packagesDir, | ||
extraFiles: <String>['example/test']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These extraFiles
changes are unrelated opportunistic cleanup; while copying an existing test in this file I noticed this argument which didn't seem like it should be necessary, and sure enough every test in this file was adding extra test files for no reason.
jmagman
approved these changes
Jul 2, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 2, 2021
fluttergithubbot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jul 2, 2021
amantoux
pushed a commit
to amantoux/plugins
that referenced
this pull request
Jul 10, 2021
Many commands had insufficient failure testing. This adds new tests that ensure that for every Process call, at least one test fails if a failure from that process were ignored (with the exception of calls in the `publish` command, which has a custom process mocking system, so was out of scope here; it already has more coverage than most tests did though.) For a few existing failure tests, adds output checks to ensure that they are testing for the *right* failures. Other changes: - Adds convenience constructors to MockProcess for the common cases of a mock process that just exits with a 0 or 1 status, to reduce test verbosity. - Fixes a few bugs that were found by the new tests. - Minor test cleanup, especially cases where a mock process was being set up just to make all calls succeed, which is the default as of recent changes.
fotiDim
pushed a commit
to fotiDim/plugins
that referenced
this pull request
Sep 13, 2021
Many commands had insufficient failure testing. This adds new tests that ensure that for every Process call, at least one test fails if a failure from that process were ignored (with the exception of calls in the `publish` command, which has a custom process mocking system, so was out of scope here; it already has more coverage than most tests did though.) For a few existing failure tests, adds output checks to ensure that they are testing for the *right* failures. Other changes: - Adds convenience constructors to MockProcess for the common cases of a mock process that just exits with a 0 or 1 status, to reduce test verbosity. - Fixes a few bugs that were found by the new tests. - Minor test cleanup, especially cases where a mock process was being set up just to make all calls succeed, which is the default as of recent changes.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Many commands had insufficient failure testing. This adds new tests that
ensure that for every Process call, at least one test fails if a failure
from that process were ignored (with the exception of calls in the
publish
command, which has a custom process mocking system, so was outof scope here; it already has more coverage than most tests did though.)
For a few existing failure tests, adds output checks to ensure that they
are testing for the right failures.
Other changes:
mock process that just exits with a 0 or 1 status, to reduce test
verbosity.
set up just to make all calls succeed, which is the default as of
recent changes.
Pre-launch Checklist
dart format
.)[shared_preferences]
///
).