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

Unified Diff: sdk/lib/_internal/pub/test/serve/does_not_install_first_if_git_url_did_not_change_test.dart

Issue 21147002: Install before starting the server if the lockfile is out of date. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/test/serve/does_not_install_first_if_git_url_did_not_change_test.dart
diff --git a/sdk/lib/_internal/pub/test/serve/unknown_dependency_test.dart b/sdk/lib/_internal/pub/test/serve/does_not_install_first_if_git_url_did_not_change_test.dart
similarity index 50%
copy from sdk/lib/_internal/pub/test/serve/unknown_dependency_test.dart
copy to sdk/lib/_internal/pub/test/serve/does_not_install_first_if_git_url_did_not_change_test.dart
index 434a84ccfb032f54cae1b11fcfd263800789f3e4..ee92c92f7ca14ef97cbd935a5f31423ee9eda393 100644
--- a/sdk/lib/_internal/pub/test/serve/unknown_dependency_test.dart
+++ b/sdk/lib/_internal/pub/test/serve/does_not_install_first_if_git_url_did_not_change_test.dart
@@ -5,6 +5,7 @@
library pub_tests;
import 'dart:io';
+import 'dart:json' as json;
import '../descriptor.dart' as d;
import '../test_pub.dart';
@@ -12,16 +13,20 @@ import 'utils.dart';
main() {
initConfig();
- integration("responds with a 404 unknown dependencies", () {
- d.dir(appPath, [
- d.appPubspec()
+ integration("does not install first if a git dependency's url is "
+ "unchanged", () {
+ d.git('foo.git', [
+ d.libPubspec('foo', '1.0.0'),
+ d.libDir("foo")
]).create();
- startPubServe();
- requestShould404("packages/foo/nope.dart");
- requestShould404("assets/foo/nope.png");
- requestShould404("dir/packages/foo/nope.dart");
- requestShould404("dir/assets/foo/nope.png");
+ d.appDir({
+ "foo": {"git": "../foo.git"}
+ }).create();
+
+ pubInstall();
+ startPubServe(shouldInstallFirst: false);
+ requestShouldSucceed("packages/foo/foo.dart", 'main() => "foo";');
endPubServe();
});
}

Powered by Google App Engine
This is Rietveld 408576698