Skip to content

Commit

Permalink
Add test argument
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem committed Sep 27, 2023
1 parent 459b25c commit 86a9189
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkgs/firehose/bin/health.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ void main(List<String> arguments) async {
var checks = parsedArgs['checks'] as List<String>;
var coverageWeb = parsedArgs['coverage_web'] as bool;

await Health(Directory.current).healthCheck(checks, coverageWeb);
await Health(Directory.current, '').healthCheck(checks, coverageWeb);
}
10 changes: 8 additions & 2 deletions pkgs/firehose/lib/src/health/health.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// ignore_for_file: always_declare_return_types

import 'dart:convert';
import 'dart:io';
import 'dart:math';

Expand Down Expand Up @@ -37,7 +38,10 @@ const String _prHealthTag = '## PR Health';
class Health {
final Directory directory;

Health(this.directory);
///DO_NOT_SUBMIT
final String testArgument;

Health(this.directory, this.testArgument);

Future<void> healthCheck(List args, bool coverageweb) async {
var github = Github();
Expand Down Expand Up @@ -125,7 +129,9 @@ Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automati
);
print('runApiTool: err:${runApiTool.stderr}, out:${runApiTool.stdout}');
final reportFile = File(path.join(currentPath, 'report.json'));
totalOut += reportFile.readAsStringSync();
var fullReport = reportFile.readAsStringSync();
var decoded = jsonDecode(fullReport) as Map<String, dynamic>;
totalOut += decoded['report'].toString();
}
return HealthCheckResult(
'breaking',
Expand Down

0 comments on commit 86a9189

Please sign in to comment.