| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package cipd | 5 package cipd |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "bytes" | 8 "bytes" |
| 9 "fmt" | 9 "fmt" |
| 10 "io" | 10 "io" |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 }) | 722 }) |
| 723 assertFile("file b", "test data") | 723 assertFile("file b", "test data") |
| 724 So(findDeployed(tempDir), ShouldResemble, PinSliceBySubd
ir{"": PinSlice{b.Pin()}}) | 724 So(findDeployed(tempDir), ShouldResemble, PinSliceBySubd
ir{"": PinSlice{b.Pin()}}) |
| 725 | 725 |
| 726 // Remove b. | 726 // Remove b. |
| 727 actions, err = callEnsure(nil, nil) | 727 actions, err = callEnsure(nil, nil) |
| 728 So(err, ShouldBeNil) | 728 So(err, ShouldBeNil) |
| 729 So(actions, ShouldResemble, Actions{ | 729 So(actions, ShouldResemble, Actions{ |
| 730 ToRemove: PinSlice{b.Pin()}, | 730 ToRemove: PinSlice{b.Pin()}, |
| 731 }) | 731 }) |
| 732 » » » So(findDeployed(tempDir), ShouldResemble, PinSliceBySubd
ir{"": PinSlice{}}) | 732 » » » So(findDeployed(tempDir), ShouldResemble, PinSliceBySubd
ir{}) |
| 733 | 733 |
| 734 // Install a1 and b. | 734 // Install a1 and b. |
| 735 actions, err = callEnsure([]local.PackageInstance{a1, b}
, []local.PackageInstance{a1, b}) | 735 actions, err = callEnsure([]local.PackageInstance{a1, b}
, []local.PackageInstance{a1, b}) |
| 736 So(err, ShouldBeNil) | 736 So(err, ShouldBeNil) |
| 737 So(actions, ShouldResemble, Actions{ | 737 So(actions, ShouldResemble, Actions{ |
| 738 ToInstall: PinSlice{a1.Pin(), b.Pin()}, | 738 ToInstall: PinSlice{a1.Pin(), b.Pin()}, |
| 739 }) | 739 }) |
| 740 assertFile("file a 1", "test data") | 740 assertFile("file a 1", "test data") |
| 741 assertFile("file b", "test data") | 741 assertFile("file b", "test data") |
| 742 So(findDeployed(tempDir), ShouldResemble, PinSliceBySubd
ir{"": PinSlice{a1.Pin(), b.Pin()}}) | 742 So(findDeployed(tempDir), ShouldResemble, PinSliceBySubd
ir{"": PinSlice{a1.Pin(), b.Pin()}}) |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 w.Header().Add(k, s) | 934 w.Header().Add(k, s) |
| 935 } | 935 } |
| 936 } | 936 } |
| 937 w.WriteHeader(exp.Status) | 937 w.WriteHeader(exp.Status) |
| 938 } | 938 } |
| 939 if exp.Reply != "" { | 939 if exp.Reply != "" { |
| 940 w.Write([]byte(exp.Reply)) | 940 w.Write([]byte(exp.Reply)) |
| 941 } | 941 } |
| 942 s.index++ | 942 s.index++ |
| 943 } | 943 } |
| OLD | NEW |