Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: utils/tests/pub/pub_uploader_test.dart

Issue 13839023: Add flag to disable capturing stack traces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add command line option to enable traces. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library pub_uploader_test; 5 library pub_uploader_test;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:json' as json; 8 import 'dart:json' as json;
9 9
10 import 'package:scheduled_test/scheduled_process.dart'; 10 import 'package:scheduled_test/scheduled_process.dart';
(...skipping 17 matching lines...) Expand all
28 '''; 28 ''';
29 29
30 ScheduledProcess startPubUploader(ScheduledServer server, List<String> args) { 30 ScheduledProcess startPubUploader(ScheduledServer server, List<String> args) {
31 var tokenEndpoint = server.url.then((url) => 31 var tokenEndpoint = server.url.then((url) =>
32 url.resolve('/token').toString()); 32 url.resolve('/token').toString());
33 args = flatten(['uploader', '--server', tokenEndpoint, args]); 33 args = flatten(['uploader', '--server', tokenEndpoint, args]);
34 return startPub(args: args, tokenEndpoint: tokenEndpoint); 34 return startPub(args: args, tokenEndpoint: tokenEndpoint);
35 } 35 }
36 36
37 main() { 37 main() {
38 initConfig();
38 group('displays usage', () { 39 group('displays usage', () {
39 integration('when run with no arguments', () { 40 integration('when run with no arguments', () {
40 schedulePub(args: ['uploader'], 41 schedulePub(args: ['uploader'],
41 output: USAGE_STRING, exitCode: 64); 42 output: USAGE_STRING, exitCode: 64);
42 }); 43 });
43 44
44 integration('when run with only a command', () { 45 integration('when run with only a command', () {
45 schedulePub(args: ['uploader', 'add'], 46 schedulePub(args: ['uploader', 'add'],
46 output: USAGE_STRING, exitCode: 64); 47 output: USAGE_STRING, exitCode: 64);
47 }); 48 });
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 server.handle('DELETE', '/packages/pkg/uploaders/email.json', (request) { 175 server.handle('DELETE', '/packages/pkg/uploaders/email.json', (request) {
175 request.response.write("{not json"); 176 request.response.write("{not json");
176 request.response.close(); 177 request.response.close();
177 }); 178 });
178 179
179 expect(pub.nextErrLine(), completion(equals('Invalid server response:'))); 180 expect(pub.nextErrLine(), completion(equals('Invalid server response:')));
180 expect(pub.nextErrLine(), completion(equals('{not json'))); 181 expect(pub.nextErrLine(), completion(equals('{not json')));
181 pub.shouldExit(1); 182 pub.shouldExit(1);
182 }); 183 });
183 } 184 }
OLDNEW
« no previous file with comments | « utils/tests/pub/oauth2/with_server_rejected_credentials_authenticates_again_test.dart ('k') | utils/tests/pub/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698