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

Side by Side Diff: test/pub_uploader_test.dart

Issue 2184303002: Make pub strong-mode clean. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 4 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
« no previous file with comments | « test/package_server.dart ('k') | test/test_pub.dart » ('j') | 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 import 'dart:convert'; 5 import 'dart:convert';
6 6
7 import 'package:pub/src/exit_codes.dart' as exit_codes; 7 import 'package:pub/src/exit_codes.dart' as exit_codes;
8 import 'package:pub/src/utils.dart'; 8 import 'package:pub/src/utils.dart';
9 import 'package:scheduled_test/scheduled_process.dart'; 9 import 'package:scheduled_test/scheduled_process.dart';
10 import 'package:scheduled_test/scheduled_server.dart'; 10 import 'package:scheduled_test/scheduled_server.dart';
(...skipping 14 matching lines...) Expand all
25 --package The package whose uploaders will be modified. 25 --package The package whose uploaders will be modified.
26 (defaults to the current package) 26 (defaults to the current package)
27 27
28 Run "pub help" to see global options. 28 Run "pub help" to see global options.
29 See http://dartlang.org/tools/pub/cmd/pub-uploader.html for detailed documentati on. 29 See http://dartlang.org/tools/pub/cmd/pub-uploader.html for detailed documentati on.
30 '''; 30 ''';
31 31
32 ScheduledProcess startPubUploader(ScheduledServer server, List<String> args) { 32 ScheduledProcess startPubUploader(ScheduledServer server, List<String> args) {
33 var tokenEndpoint = server.url.then((url) => 33 var tokenEndpoint = server.url.then((url) =>
34 url.resolve('/token').toString()); 34 url.resolve('/token').toString());
35 args = flatten(['uploader', '--server', tokenEndpoint, args]); 35 args = ['uploader', '--server', tokenEndpoint]..addAll(args);
36 return startPub(args: args, tokenEndpoint: tokenEndpoint); 36 return startPub(args: args, tokenEndpoint: tokenEndpoint);
37 } 37 }
38 38
39 main() { 39 main() {
40 group('displays usage', () { 40 group('displays usage', () {
41 integration('when run with no arguments', () { 41 integration('when run with no arguments', () {
42 schedulePub(args: ['uploader'], 42 schedulePub(args: ['uploader'],
43 output: USAGE_STRING, exitCode: exit_codes.USAGE); 43 output: USAGE_STRING, exitCode: exit_codes.USAGE);
44 }); 44 });
45 45
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 server.handle('DELETE', '/api/packages/pkg/uploaders/email', 158 server.handle('DELETE', '/api/packages/pkg/uploaders/email',
159 (request) => new shelf.Response.ok("{not json")); 159 (request) => new shelf.Response.ok("{not json"));
160 160
161 pub.stderr.expect(emitsLines( 161 pub.stderr.expect(emitsLines(
162 'Invalid server response:\n' 162 'Invalid server response:\n'
163 '{not json')); 163 '{not json'));
164 pub.shouldExit(1); 164 pub.shouldExit(1);
165 }); 165 });
166 } 166 }
OLDNEW
« no previous file with comments | « test/package_server.dart ('k') | test/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698