File tree Expand file tree Collapse file tree 2 files changed +0
-40
lines changed Expand file tree Collapse file tree 2 files changed +0
-40
lines changed Original file line number Diff line number Diff line change @@ -111,31 +111,6 @@ func buildDs3GetObjectListStream(ds3GetObjects []Ds3GetObject) networking.Reader
111111 return marshalRequestPayload (objects )
112112}
113113
114- type Ds3VerifyObject struct {
115- Name string `xml:"Name,attr"`
116- Length int64 `xml:"Length,attr"`
117- }
118-
119- type ds3VerifyObjectList struct {
120- XMLName xml.Name
121- Ds3VerifyObjects []Ds3VerifyObject `xml:"Object"`
122- }
123-
124- func newDs3VerifyObjectList (ds3VerifyObjects []Ds3VerifyObject ) * ds3VerifyObjectList {
125- return & ds3VerifyObjectList {
126- XMLName : xml.Name {Local :"Objects" },
127- Ds3VerifyObjects : ds3VerifyObjects ,
128- }
129- }
130-
131- // Converts the ds3 put object list into a request payload stream of format:
132- // <Objects><Object Name="o1" Length="2048"></Object><Object Name="o2" Length="2048"></Object>...</Objects>
133- func buildDs3VerifyObjectListStream (ds3VerifyObjects []Ds3VerifyObject ) networking.ReaderWithSizeDecorator {
134- // Build the ds3 put object list entity.
135- objects := newDs3VerifyObjectList (ds3VerifyObjects )
136- return marshalRequestPayload (objects )
137- }
138-
139114type deleteObjectList struct {
140115 XMLName xml.Name
141116 Objects []deleteObject `xml:"Object"`
Original file line number Diff line number Diff line change @@ -84,21 +84,6 @@ func TestBuildDs3GetObjectListStream(t *testing.T) {
8484 verifyStreamContent (t , contentStream , expected )
8585}
8686
87- func TestBuildDs3VerifyObjectListStream (t * testing.T ) {
88- expected := "<Objects><Object Name=\" o1\" Length=\" 1\" ></Object><Object Name=\" o2\" Length=\" 2\" ></Object><Object Name=\" o3\" Length=\" 3\" ></Object></Objects>"
89-
90- ds3VerifyObjects := []Ds3VerifyObject {
91- {Name :"o1" , Length :1 },
92- {Name :"o2" , Length :2 },
93- {Name :"o3" , Length :3 },
94- }
95-
96- contentStream := buildDs3VerifyObjectListStream (ds3VerifyObjects )
97-
98- defer contentStream .Close ()
99- verifyStreamContent (t , contentStream , expected )
100- }
101-
10287func TestBuildDeleteObjectsPayload (t * testing.T ) {
10388 expected := "<Delete><Object><Key>o1</Key></Object><Object><Key>o2</Key></Object><Object><Key>o3</Key></Object></Delete>"
10489
You can’t perform that action at this time.
0 commit comments