@@ -41,23 +41,24 @@ func newRemoteRes(url string) common.ResourceString {
41
41
return r
42
42
}
43
43
44
- func (s * copyEnumeratorHelperTestSuite ) TestAddTransferPathRootsTrimmed (c * chk.C ) {
44
+ func (s * copyEnumeratorHelperTestSuite ) TestRelativePath (c * chk.C ) {
45
45
// setup
46
- request := common. CopyJobPartOrderRequest {
47
- SourceRoot : newLocalRes ("a/b/" ),
48
- DestinationRoot : newLocalRes ("y/z/" ),
46
+ cca := CookedCopyCmdArgs {
47
+ Source : newLocalRes ("a/b/" ),
48
+ Destination : newLocalRes ("y/z/" ),
49
49
}
50
50
51
- transfer := common.CopyTransfer {
52
- Source : "a/b/c.txt" ,
53
- Destination : "y/z/c.txt" ,
51
+ object := StoredObject {
52
+ name : "c.txt" ,
53
+ entityType : 1 ,
54
+ relativePath : "c.txt" ,
54
55
}
55
56
56
57
// execute
57
- err := addTransfer (& request , transfer , & CookedCopyCmdArgs {})
58
+ srcRelPath := cca .MakeEscapedRelativePath (true , false , false , object )
59
+ destRelPath := cca .MakeEscapedRelativePath (false , true , false , object )
58
60
59
61
// assert
60
- c .Assert (err , chk .IsNil )
61
- c .Assert (request .Transfers .List [0 ].Source , chk .Equals , "c.txt" )
62
- c .Assert (request .Transfers .List [0 ].Destination , chk .Equals , "c.txt" )
62
+ c .Assert (srcRelPath , chk .Equals , "/c.txt" )
63
+ c .Assert (destRelPath , chk .Equals , "/c.txt" )
63
64
}
0 commit comments