(bucket, keys, size, callback)
| 332 | } |
| 333 | |
| 334 | function multiObjectDelete(bucket, keys, size, callback) { |
| 335 | if (!s3Config.isQuotaInflightEnabled()) { |
| 336 | mockScuba.incrementBytesForBucket(bucket, -size); |
| 337 | } |
| 338 | const deleteObjectsParams = keys.map(key => ({ Key: key })); |
| 339 | const command = new DeleteObjectsCommand({ |
| 340 | Bucket: bucket, |
| 341 | Delete: { |
| 342 | Objects: deleteObjectsParams, |
| 343 | Quiet: false, |
| 344 | }, |
| 345 | }); |
| 346 | |
| 347 | return s3Client.send(command) |
| 348 | .then(data => { |
| 349 | callback(null, data); |
| 350 | }) |
| 351 | .catch(err => { |
| 352 | if (!s3Config.isQuotaInflightEnabled()) { |
| 353 | mockScuba.incrementBytesForBucket(bucket, size); |
| 354 | } |
| 355 | return callback(err); |
| 356 | }); |
| 357 | } |
| 358 | |
| 359 | (process.env.S3METADATA === 'mongodb' ? describe : describe.skip)('quota evaluation with scuba metrics', |
| 360 | function t() { |
no test coverage detected