mirror of
https://github.com/flutter/packages.git
synced 2025-06-06 11:29:17 +08:00
[flutter_plugin_tool] Fix CHANGELOG validation failure summary (#4266)
The error summary for a CHANGELOG validation failure was written when the only thing being checked was that the versions matched, but now there are other ways to fail as well (i.e., leaving NEXT). This fixes the summary message to be more generic so that it doesn't mislead people who hit validation failures. While adding the test for this message, I discovered that almost all of the tests were actually talking to pub.dev, causing their behavior to in some cases depend on whether a package with that name happened to have been published, and if so what its version was. In order to make the tests hermetic and predictable, this fixes that by making all tests use a mock HTTP client.
This commit is contained in:
@ -178,7 +178,7 @@ class VersionCheckCommand extends PackageLoopingCommand {
|
||||
|
||||
if (!(await _validateChangelogVersion(package,
|
||||
pubspec: pubspec, pubspecVersionChanged: versionChanged))) {
|
||||
errors.add('pubspec.yaml and CHANGELOG.md have different versions');
|
||||
errors.add('CHANGELOG.md failed validation.');
|
||||
}
|
||||
|
||||
return errors.isEmpty
|
||||
|
Reference in New Issue
Block a user