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

Side by Side Diff: sdk/lib/_internal/pub/test/pub_uploader_test.dart

Issue 335313004: Fix broken pub tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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
« no previous file with comments | « sdk/lib/_internal/pub/test/lish/force_cannot_be_combined_with_dry_run_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:convert'; 7 import 'dart:convert';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:scheduled_test/scheduled_process.dart'; 10 import 'package:scheduled_test/scheduled_process.dart';
(...skipping 10 matching lines...) Expand all
21 final USAGE_STRING = ''' 21 final USAGE_STRING = '''
22 Manage uploaders for a package on pub.dartlang.org. 22 Manage uploaders for a package on pub.dartlang.org.
23 23
24 Usage: pub uploader [options] {add/remove} <email> 24 Usage: pub uploader [options] {add/remove} <email>
25 -h, --help Print usage information for this command. 25 -h, --help Print usage information for this command.
26 --server The package server on which the package is hosted. 26 --server The package server on which the package is hosted.
27 (defaults to "https://pub.dartlang.org") 27 (defaults to "https://pub.dartlang.org")
28 28
29 --package The package whose uploaders will be modified. 29 --package The package whose uploaders will be modified.
30 (defaults to the current package) 30 (defaults to the current package)
31
32 See http://dartlang.org/tools/pub/cmd/pub-uploader.html for detailed documentati on.
31 '''; 33 ''';
32 34
33 ScheduledProcess startPubUploader(ScheduledServer server, List<String> args) { 35 ScheduledProcess startPubUploader(ScheduledServer server, List<String> args) {
34 var tokenEndpoint = server.url.then((url) => 36 var tokenEndpoint = server.url.then((url) =>
35 url.resolve('/token').toString()); 37 url.resolve('/token').toString());
36 args = flatten(['uploader', '--server', tokenEndpoint, args]); 38 args = flatten(['uploader', '--server', tokenEndpoint, args]);
37 return startPub(args: args, tokenEndpoint: tokenEndpoint); 39 return startPub(args: args, tokenEndpoint: tokenEndpoint);
38 } 40 }
39 41
40 main() { 42 main() {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 162
161 server.handle('DELETE', '/api/packages/pkg/uploaders/email', 163 server.handle('DELETE', '/api/packages/pkg/uploaders/email',
162 (request) => new shelf.Response.ok("{not json")); 164 (request) => new shelf.Response.ok("{not json"));
163 165
164 pub.stderr.expect(emitsLines( 166 pub.stderr.expect(emitsLines(
165 'Invalid server response:\n' 167 'Invalid server response:\n'
166 '{not json')); 168 '{not json'));
167 pub.shouldExit(1); 169 pub.shouldExit(1);
168 }); 170 });
169 } 171 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/test/lish/force_cannot_be_combined_with_dry_run_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698