| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS 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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library pub_tests; | 5 library pub_tests; |
| 6 | 6 |
| 7 import 'package:pub/src/exit_codes.dart' as exit_codes; | 7 import 'package:pub/src/exit_codes.dart' as exit_codes; |
| 8 import 'package:scheduled_test/scheduled_test.dart'; | 8 import 'package:scheduled_test/scheduled_test.dart'; |
| 9 | 9 |
| 10 import '../../descriptor.dart' as d; | 10 import '../../descriptor.dart' as d; |
| 11 import '../../test_pub.dart'; | 11 import '../../test_pub.dart'; |
| 12 | 12 |
| 13 main() { | 13 main() { |
| 14 initConfig(); | |
| 15 integration('handles failure to reinstall some packages', () { | 14 integration('handles failure to reinstall some packages', () { |
| 16 // Only serve two packages so repairing will have a failure. | 15 // Only serve two packages so repairing will have a failure. |
| 17 servePackages((builder) { | 16 servePackages((builder) { |
| 18 builder.serve("foo", "1.2.3"); | 17 builder.serve("foo", "1.2.3"); |
| 19 builder.serve("foo", "1.2.5"); | 18 builder.serve("foo", "1.2.5"); |
| 20 }); | 19 }); |
| 21 | 20 |
| 22 // Set up a cache with some packages. | 21 // Set up a cache with some packages. |
| 23 d.dir(cachePath, [ | 22 d.dir(cachePath, [ |
| 24 d.dir('hosted', [ | 23 d.dir('hosted', [ |
| (...skipping 23 matching lines...) Expand all Loading... |
| 48 | 47 |
| 49 pub.stderr.expect(startsWith("Failed to repair foo 1.2.4. Error:")); | 48 pub.stderr.expect(startsWith("Failed to repair foo 1.2.4. Error:")); |
| 50 pub.stderr.expect("HTTP error 404: Not Found"); | 49 pub.stderr.expect("HTTP error 404: Not Found"); |
| 51 | 50 |
| 52 pub.stdout.expect("Reinstalled 2 packages."); | 51 pub.stdout.expect("Reinstalled 2 packages."); |
| 53 pub.stdout.expect("Failed to reinstall 1 package."); | 52 pub.stdout.expect("Failed to reinstall 1 package."); |
| 54 | 53 |
| 55 pub.shouldExit(exit_codes.UNAVAILABLE); | 54 pub.shouldExit(exit_codes.UNAVAILABLE); |
| 56 }); | 55 }); |
| 57 } | 56 } |
| OLD | NEW |