This reverts commit 297c7b5cf2.
This commit is contained in:
@@ -1,65 +0,0 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_devicelab/framework/runner.dart';
|
||||
import 'package:flutter_devicelab/framework/task_result.dart';
|
||||
|
||||
import '../common.dart';
|
||||
|
||||
void main() {
|
||||
final Map<String, String> isolateParams = <String, String>{
|
||||
'enableConfig': 'false',
|
||||
'runProcessCleanup': 'false',
|
||||
'timeoutInMinutes': '1',
|
||||
};
|
||||
|
||||
test('runs build and test when no args are passed', () async {
|
||||
final TaskResult result = await runTask(
|
||||
'smoke_test_build_test',
|
||||
deviceId: 'FAKE_SUCCESS',
|
||||
isolateParams: isolateParams,
|
||||
);
|
||||
expect(result.data['benchmark'], 'data');
|
||||
});
|
||||
|
||||
test('runs build only when build arg is given', () async {
|
||||
final TaskResult result = await runTask(
|
||||
'smoke_test_build_test',
|
||||
taskArgs: <String>['--build'],
|
||||
deviceId: 'FAKE_SUCCESS',
|
||||
isolateParams: isolateParams,
|
||||
);
|
||||
expect(result.message, 'No tests run');
|
||||
});
|
||||
|
||||
test('runs test only when test arg is given', () async {
|
||||
final TaskResult result = await runTask(
|
||||
'smoke_test_build_test',
|
||||
taskArgs: <String>['--test'],
|
||||
deviceId: 'FAKE_SUCCESS',
|
||||
isolateParams: isolateParams,
|
||||
);
|
||||
expect(result.data['benchmark'], 'data');
|
||||
});
|
||||
|
||||
test('throws exception when build and test arg are given', () async {
|
||||
final TaskResult result = await runTask(
|
||||
'smoke_test_build_test',
|
||||
taskArgs: <String>['--build', '--test'],
|
||||
deviceId: 'FAKE_SUCCESS',
|
||||
isolateParams: isolateParams,
|
||||
);
|
||||
expect(result.message, 'Task failed: Exception: Both build and test should not be passed. Pass only one.');
|
||||
});
|
||||
|
||||
test('throws exception when build and application binary arg are given', () async {
|
||||
final TaskResult result = await runTask(
|
||||
'smoke_test_build_test',
|
||||
taskArgs: <String>['--build', '--application-binary-path=test.apk'],
|
||||
deviceId: 'FAKE_SUCCESS',
|
||||
isolateParams: isolateParams,
|
||||
);
|
||||
expect(result.message, 'Task failed: Exception: Application binary path is only used for tests');
|
||||
});
|
||||
}
|
||||
@@ -20,10 +20,11 @@ void main() {
|
||||
group('parse service', () {
|
||||
const String badOutput = 'No uri here';
|
||||
const String sampleOutput = 'An Observatory debugger and profiler on '
|
||||
'Pixel 3 XL is available at: http://127.0.0.1:9090/LpjUpsdEjqI=/';
|
||||
'Pixel 3 XL is available at: http://127.0.0.1:9090/LpjUpsdEjqI=/';
|
||||
|
||||
test('uri', () {
|
||||
expect(parseServiceUri(sampleOutput), Uri.parse('http://127.0.0.1:9090/LpjUpsdEjqI=/'));
|
||||
expect(parseServiceUri(sampleOutput),
|
||||
Uri.parse('http://127.0.0.1:9090/LpjUpsdEjqI=/'));
|
||||
expect(parseServiceUri(badOutput), null);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user