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

Side by Side Diff: cipd/client/cipd/client_test.go

Issue 2657293005: [cipd] Add subdir support to deployer. (Closed)
Patch Set: fix tests Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | cipd/client/cipd/local/deployer.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | cipd/client/cipd/local/deployer.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698