Function
checkVersionData
(s3, bucket, objectKey, versionId, dataValue, done)
Source from the content-addressed store, hash-verified
| 158 | } |
| 159 | |
| 160 | function checkVersionData(s3, bucket, objectKey, versionId, dataValue, done) { |
| 161 | return s3.send(new GetObjectCommand({ |
| 162 | Bucket: bucket, |
| 163 | Key: objectKey, |
| 164 | VersionId: versionId, |
| 165 | })).then(async data => { |
| 166 | try { |
| 167 | const body = await data.Body.transformToString(); |
| 168 | assert.strictEqual(body, dataValue); |
| 169 | return done(); |
| 170 | } catch (err) { |
| 171 | return done(err); |
| 172 | } |
| 173 | }).catch(err => done(err)); |
| 174 | } |
| 175 | |
| 176 | function updateStorageClass(data, storageClass) { |
| 177 | let result; |
Tested by
no test coverage detected