MCPcopy
hub / github.com/scality/cloudserver / checkObjectData

Function checkObjectData

tests/multipleBackend/routes/routeBackbeat.js:145–158  ·  view source on GitHub ↗
(s3, bucket, objectKey, dataValue, done)

Source from the content-addressed store, hash-verified

143};
144
145function checkObjectData(s3, bucket, objectKey, dataValue, done) {
146 s3.send(new GetObjectCommand({
147 Bucket: bucket,
148 Key: objectKey,
149 })).then(async data => {
150 try {
151 const body = await data.Body.transformToString();
152 assert.strictEqual(body, dataValue);
153 return done();
154 } catch (err) {
155 return done(err);
156 }
157 }).catch(err => done(err));
158}
159
160function checkVersionData(s3, bucket, objectKey, versionId, dataValue, done) {
161 return s3.send(new GetObjectCommand({

Callers 1

routeBackbeat.jsFile · 0.85

Calls 1

sendMethod · 0.80

Tested by

no test coverage detected