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

Side by Side Diff: test/list_package_dirs/lists_dependency_directories_test.dart

Issue 1664563002: Refactor test servers to make them less global. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 10 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/get/hosted/unlock_if_version_doesnt_exist_test.dart ('k') | test/package_server.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 d.file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.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 d.file. 3 // BSD-style license that can be found in the LICENSE d.file.
4 4
5 import 'package:path/path.dart' as path; 5 import 'package:path/path.dart' as path;
6 import 'package:pub/src/io.dart'; 6 import 'package:pub/src/io.dart';
7 7
8 import '../descriptor.dart' as d; 8 import '../descriptor.dart' as d;
9 import '../test_pub.dart'; 9 import '../test_pub.dart';
10 10
(...skipping 16 matching lines...) Expand all
27 pubGet(); 27 pubGet();
28 28
29 // Note: Using canonicalize here because pub gets the path to the 29 // Note: Using canonicalize here because pub gets the path to the
30 // entrypoint package from the working directory, which has had symlinks 30 // entrypoint package from the working directory, which has had symlinks
31 // resolve. On Mac, "/tmp" is actually a symlink to "/private/tmp", so we 31 // resolve. On Mac, "/tmp" is actually a symlink to "/private/tmp", so we
32 // need to accomodate that. 32 // need to accomodate that.
33 schedulePub(args: ["list-package-dirs", "--format=json"], 33 schedulePub(args: ["list-package-dirs", "--format=json"],
34 outputJson: { 34 outputJson: {
35 "packages": { 35 "packages": {
36 "foo": path.join(sandboxDir, "foo", "lib"), 36 "foo": path.join(sandboxDir, "foo", "lib"),
37 "bar": port.then((p) => path.join(sandboxDir, cachePath, "hosted", 37 "bar": globalServer.port.then(
38 "localhost%58$p", "bar-1.0.0", "lib")), 38 (p) => path.join(sandboxDir, cachePath, "hosted",
39 "localhost%58$p", "bar-1.0.0", "lib")),
39 "myapp": canonicalize(path.join(sandboxDir, appPath, "lib")) 40 "myapp": canonicalize(path.join(sandboxDir, appPath, "lib"))
40 }, 41 },
41 "input_files": [ 42 "input_files": [
42 canonicalize(path.join(sandboxDir, appPath, "pubspec.lock")), 43 canonicalize(path.join(sandboxDir, appPath, "pubspec.lock")),
43 canonicalize(path.join(sandboxDir, appPath, "pubspec.yaml")) 44 canonicalize(path.join(sandboxDir, appPath, "pubspec.yaml"))
44 ] 45 ]
45 }); 46 });
46 }); 47 });
47 } 48 }
OLDNEW
« no previous file with comments | « test/get/hosted/unlock_if_version_doesnt_exist_test.dart ('k') | test/package_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698