Index: sdk/lib/_internal/pub/test/downgrade/doesnt_change_git_dependencies_test.dart |
diff --git a/sdk/lib/_internal/pub/test/get/git/doesnt_fetch_if_nothing_changes_test.dart b/sdk/lib/_internal/pub/test/downgrade/doesnt_change_git_dependencies_test.dart |
similarity index 57% |
copy from sdk/lib/_internal/pub/test/get/git/doesnt_fetch_if_nothing_changes_test.dart |
copy to sdk/lib/_internal/pub/test/downgrade/doesnt_change_git_dependencies_test.dart |
index 54cd98c62e249139c31d33629878c382d0868699..b661c7dc4c6bef28939fcccf9c4f2a19fbcfa270 100644 |
--- a/sdk/lib/_internal/pub/test/get/git/doesnt_fetch_if_nothing_changes_test.dart |
+++ b/sdk/lib/_internal/pub/test/downgrade/doesnt_change_git_dependencies_test.dart |
@@ -2,28 +2,25 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-library pub_tests; |
- |
-import 'package:path/path.dart' as p; |
+import 'package:path/path.dart' as path; |
import 'package:scheduled_test/scheduled_test.dart'; |
-import '../../../lib/src/io.dart'; |
-import '../../descriptor.dart' as d; |
-import '../../test_pub.dart'; |
+import '../../lib/src/io.dart'; |
+import '../descriptor.dart' as d; |
+import '../test_pub.dart'; |
main() { |
initConfig(); |
- integration("doesn't re-fetch a repository if nothing changes", () { |
+ integration("doesn't change git dependencies", () { |
ensureGit(); |
- var repo = d.git('foo.git', [ |
+ d.git('foo.git', [ |
d.libDir('foo'), |
d.libPubspec('foo', '1.0.0') |
- ]); |
- repo.create(); |
+ ]).create(); |
d.appDir({ |
- "foo": {"git": {"url": "../foo.git"}} |
+ "foo": {"git": "../foo.git"} |
}).create(); |
pubGet(); |
@@ -34,11 +31,12 @@ main() { |
]) |
]).validate(); |
- // Delete the repo. This will cause "pub get" to fail if it tries to |
- // re-fetch. |
- schedule(() => deleteEntry(p.join(sandboxDir, 'foo.git'))); |
+ d.git('foo.git', [ |
+ d.libDir('foo', 'foo 2'), |
+ d.libPubspec('foo', '1.0.0') |
+ ]).commit(); |
- pubGet(); |
+ pubDowngrade(); |
d.dir(packagesPath, [ |
d.dir('foo', [ |