Unverified Commit 1747adb6 authored by Dan Field's avatar Dan Field Committed by GitHub

Drop mockito for flutter_goldens (#74782)

parent fe921211
......@@ -30,7 +30,4 @@ dependencies:
test_api: 0.2.19-nullsafety.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
vector_math: 2.1.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dev_dependencies:
mockito: 4.1.1
# PUBSPEC CHECKSUM: 49d5
# PUBSPEC CHECKSUM: ae8f
......@@ -79,7 +79,8 @@ class SkiaGoldClient {
Future<void> auth() async {
if (await clientIsAuthorized())
return;
final List<String> authArguments = <String>[
final List<String> authCommand = <String>[
_goldctl,
'auth',
'--work-dir', workDirectory
.childDirectory('temp')
......@@ -87,10 +88,7 @@ class SkiaGoldClient {
'--luci',
];
final io.ProcessResult result = await io.Process.run(
_goldctl,
authArguments,
);
final io.ProcessResult result = await process.run(authCommand);
if (result.exitCode != 0) {
final StringBuffer buf = StringBuffer()
......@@ -118,7 +116,8 @@ class SkiaGoldClient {
await failures.create();
final String commitHash = await _getCurrentCommit();
final List<String> imgtestInitArguments = <String>[
final List<String> imgtestInitCommand = <String>[
_goldctl,
'imgtest', 'init',
'--instance', 'flutter',
'--work-dir', workDirectory
......@@ -130,19 +129,16 @@ class SkiaGoldClient {
'--passfail',
];
if (imgtestInitArguments.contains(null)) {
if (imgtestInitCommand.contains(null)) {
final StringBuffer buf = StringBuffer()
..writeln('A null argument was provided for Skia Gold imgtest init.')
..writeln('Please confirm the settings of your golden file test.')
..writeln('Arguments provided:');
imgtestInitArguments.forEach(buf.writeln);
imgtestInitCommand.forEach(buf.writeln);
throw Exception(buf.toString());
}
final io.ProcessResult result = await io.Process.run(
_goldctl,
imgtestInitArguments,
);
final io.ProcessResult result = await process.run(imgtestInitCommand);
if (result.exitCode != 0) {
final StringBuffer buf = StringBuffer()
......@@ -167,7 +163,8 @@ class SkiaGoldClient {
/// The [testName] and [goldenFile] parameters reference the current
/// comparison being evaluated by the [FlutterPostSubmitFileComparator].
Future<bool> imgtestAdd(String testName, File goldenFile) async {
final List<String> imgtestArguments = <String>[
final List<String> imgtestCommand = <String>[
_goldctl,
'imgtest', 'add',
'--work-dir', workDirectory
.childDirectory('temp')
......@@ -176,10 +173,7 @@ class SkiaGoldClient {
'--png-file', goldenFile.path,
];
final io.ProcessResult result = await io.Process.run(
_goldctl,
imgtestArguments,
);
final io.ProcessResult result = await process.run(imgtestCommand);
if (result.exitCode != 0) {
// We do not want to throw for non-zero exit codes here, as an intentional
......@@ -205,7 +199,8 @@ class SkiaGoldClient {
await failures.create();
final String commitHash = await _getCurrentCommit();
final List<String> imgtestInitArguments = <String>[
final List<String> imgtestInitCommand = <String>[
_goldctl,
'imgtest', 'init',
'--instance', 'flutter',
'--work-dir', workDirectory
......@@ -220,19 +215,16 @@ class SkiaGoldClient {
...getCIArguments(),
];
if (imgtestInitArguments.contains(null)) {
if (imgtestInitCommand.contains(null)) {
final StringBuffer buf = StringBuffer()
..writeln('A null argument was provided for Skia Gold tryjob init.')
..writeln('Please confirm the settings of your golden file test.')
..writeln('Arguments provided:');
imgtestInitArguments.forEach(buf.writeln);
imgtestInitCommand.forEach(buf.writeln);
throw Exception(buf.toString());
}
final io.ProcessResult result = await io.Process.run(
_goldctl,
imgtestInitArguments,
);
final io.ProcessResult result = await process.run(imgtestInitCommand);
if (result.exitCode != 0) {
final StringBuffer buf = StringBuffer()
......@@ -257,7 +249,8 @@ class SkiaGoldClient {
/// The [testName] and [goldenFile] parameters reference the current
/// comparison being evaluated by the [FlutterPreSubmitFileComparator].
Future<void> tryjobAdd(String testName, File goldenFile) async {
final List<String> imgtestArguments = <String>[
final List<String> imgtestCommand = <String>[
_goldctl,
'imgtest', 'add',
'--work-dir', workDirectory
.childDirectory('temp')
......@@ -266,10 +259,7 @@ class SkiaGoldClient {
'--png-file', goldenFile.path,
];
final io.ProcessResult result = await io.Process.run(
_goldctl,
imgtestArguments,
);
final io.ProcessResult result = await process.run(imgtestCommand);
final String/*!*/ resultStdout = result.stdout.toString();
if (result.exitCode != 0 &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment