Include git output into error message from channel command (#28658)

This commit is contained in:
Alexander Markov
2019-03-01 10:22:59 -08:00
committed by GitHub
parent be083da9c6
commit 604e9dc683
2 changed files with 22 additions and 6 deletions

View File

@@ -41,15 +41,23 @@ void main() {
Cache.disableLocking();
});
testUsingContext('list', () async {
Future<void> simpleChannelTest(List<String> args) async {
final ChannelCommand command = ChannelCommand();
final CommandRunner<void> runner = createTestCommandRunner(command);
await runner.run(<String>['channel']);
await runner.run(args);
expect(testLogger.errorText, hasLength(0));
// The bots may return an empty list of channels (network hiccup?)
// and when run locally the list of branches might be different
// so we check for the header text rather than any specific channel name.
expect(testLogger.statusText, contains('Flutter channels:'));
}
testUsingContext('list', () async {
await simpleChannelTest(<String>['channel']);
});
testUsingContext('verbose list', () async {
await simpleChannelTest(<String>['channel', '-v']);
});
testUsingContext('removes duplicates', () async {