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

Unified Diff: test/get/hosted/get_test.dart

Issue 1664903003: Properly include the hosted URL in all IDs. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/descriptor.dart ('k') | test/package_server.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/get/hosted/get_test.dart
diff --git a/test/get/hosted/get_test.dart b/test/get/hosted/get_test.dart
index 9329d36864f3393594026214dd46d98ec4ebe189..01e2f501ca848fbe39e4bb6edbf273560e247e2e 100644
--- a/test/get/hosted/get_test.dart
+++ b/test/get/hosted/get_test.dart
@@ -29,4 +29,29 @@ main() {
r"Could not find package bad name! at http://localhost:\d+\."),
exitCode: exit_codes.UNAVAILABLE);
});
+
+ integration('gets a package from a non-default pub server', () {
+ // Make the default server serve errors. Only the custom server should
+ // be accessed.
+ serveErrors();
+
+ var server = new PackageServer((builder) {
+ builder.serve("foo", "1.2.3");
+ });
+
+ d.appDir({
+ "foo": {
+ "version": "1.2.3",
+ "hosted": {
+ "name": "foo",
+ "url": server.port.then((port) => "http://localhost:$port")
+ }
+ }
+ }).create();
+
+ pubGet();
+
+ d.cacheDir({"foo": "1.2.3"}, port: server.port).validate();
+ d.packagesDir({"foo": "1.2.3"}).validate();
+ });
}
« no previous file with comments | « test/descriptor.dart ('k') | test/package_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698