Index: sdk/lib/_internal/pub_generated/test/get/hosted/does_no_network_requests_when_possible_test.dart |
diff --git a/sdk/lib/_internal/pub_generated/test/get/hosted/does_no_network_requests_when_possible_test.dart b/sdk/lib/_internal/pub_generated/test/get/hosted/does_no_network_requests_when_possible_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..928716a1f5c09254fbc8b1a3ba89ba50c415e2fe |
--- /dev/null |
+++ b/sdk/lib/_internal/pub_generated/test/get/hosted/does_no_network_requests_when_possible_test.dart |
@@ -0,0 +1,29 @@ |
+library pub_tests; |
+import 'package:scheduled_test/scheduled_test.dart'; |
+import '../../descriptor.dart' as d; |
+import '../../test_pub.dart'; |
+main() { |
+ initConfig(); |
+ integration('does not request versions if the lockfile is up to date', () { |
+ servePackages((builder) { |
+ builder.serve("foo", "1.0.0"); |
+ builder.serve("foo", "1.1.0"); |
+ builder.serve("foo", "1.2.0"); |
+ }); |
+ d.appDir({ |
+ "foo": "any" |
+ }).create(); |
+ pubGet(); |
+ getRequestedPaths(); |
+ pubGet(); |
+ d.cacheDir({ |
+ "foo": "1.2.0" |
+ }).validate(); |
+ d.packagesDir({ |
+ "foo": "1.2.0" |
+ }).validate(); |
+ getRequestedPaths().then((paths) { |
+ expect(paths, isEmpty); |
+ }); |
+ }); |
+} |