| 153 | } |
| 154 | |
| 155 | function assertMpuCompleteResults(compResult, objectKey) { |
| 156 | parseString(compResult, (err, json) => { |
| 157 | assert.equal(err, null, |
| 158 | `Error parsing mpu complete results: ${err}`); |
| 159 | assert.strictEqual( |
| 160 | json.CompleteMultipartUploadResult.Location[0], |
| 161 | `http://${bucketName}.s3.amazonaws.com/${objectKey}`); |
| 162 | assert.strictEqual( |
| 163 | json.CompleteMultipartUploadResult.Bucket[0], |
| 164 | bucketName); |
| 165 | assert.strictEqual( |
| 166 | json.CompleteMultipartUploadResult.Key[0], objectKey); |
| 167 | const MD = metadata.keyMaps.get(bucketName).get(objectKey); |
| 168 | assert(MD); |
| 169 | }); |
| 170 | } |
| 171 | |
| 172 | function assertListResults(listResult, testAttribute, uploadId, objectKey) { |
| 173 | parseString(listResult, (err, json) => { |