Skip to content

Commit

Permalink
MANTA-4341 Optimize conditional object operations (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
chudley authored Apr 9, 2020
1 parent c7fa0d8 commit 965bcfb
Show file tree
Hide file tree
Showing 3 changed files with 431 additions and 82 deletions.
2 changes: 1 addition & 1 deletion lib/buckets.js
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ function headBucketObject(bucketName, objectName, opts, cb) {
}

req.once('result', function onRes(resErr, res) {
if (!res) {
if (resErr) {
readBucketApiErr(resErr, res, cb);
return;
}
Expand Down
10 changes: 10 additions & 0 deletions test/integration/buckets-client-basic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ test('buckets client basic', testOpts, function (suite) {
});
});

test('headBucketObject (not found)', function (t) {
clientMethodsToTest.delete('headBucketObject');
client.headBucketObject(BUCKET_NAME, OBJECT_NAME + '-not-found',
function (err) {
t.ok(err);
t.ok(err.statusCode, 404);
t.end();
});
});

test('getBucketObject', function (t) {
clientMethodsToTest.delete('getBucketObject');
client.getBucketObject(BUCKET_NAME, OBJECT_NAME,
Expand Down
Loading

0 comments on commit 965bcfb

Please sign in to comment.